You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
707 lines
57 KiB
707 lines
57 KiB
<!DOCTYPE HTML>
|
|
<html lang="de">
|
|
<head>
|
|
<!-- Generated by javadoc (17) on Thu May 12 09:13:23 CEST 2022 -->
|
|
<title>Playground</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="dc.created" content="2022-05-12">
|
|
<meta name="description" content="declaration: package: playground, class: Playground">
|
|
<meta name="generator" content="javadoc/ClassWriterImpl">
|
|
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
|
|
<link rel="stylesheet" type="text/css" href="../script-dir/jquery-ui.min.css" title="Style">
|
|
<link rel="stylesheet" type="text/css" href="../jquery-ui.overrides.css" title="Style">
|
|
<script type="text/javascript" src="../script.js"></script>
|
|
<script type="text/javascript" src="../script-dir/jquery-3.5.1.min.js"></script>
|
|
<script type="text/javascript" src="../script-dir/jquery-ui.min.js"></script>
|
|
</head>
|
|
<body class="class-declaration-page">
|
|
<script type="text/javascript">var evenRowColor = "even-row-color";
|
|
var oddRowColor = "odd-row-color";
|
|
var tableTab = "table-tab";
|
|
var activeTableTab = "active-table-tab";
|
|
var pathtoroot = "../";
|
|
loadScripts(document, 'script');</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<div class="flex-box">
|
|
<header role="banner" class="flex-header">
|
|
<nav role="navigation">
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="top-nav" id="navbar-top">
|
|
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
|
|
<li><a href="../index.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="nav-bar-cell1-rev">Class</li>
|
|
<li><a href="class-use/Playground.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../help-doc.html#class">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="sub-nav">
|
|
<div>
|
|
<ul class="sub-nav-list">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field-summary">Field</a> | </li>
|
|
<li><a href="#constructor-summary">Constr</a> | </li>
|
|
<li><a href="#method-summary">Method</a></li>
|
|
</ul>
|
|
<ul class="sub-nav-list">
|
|
<li>Detail: </li>
|
|
<li><a href="#field-detail">Field</a> | </li>
|
|
<li><a href="#constructor-detail">Constr</a> | </li>
|
|
<li><a href="#method-detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
|
|
<input type="text" id="search-input" value="search" disabled="disabled">
|
|
<input type="reset" id="reset-button" value="reset" disabled="disabled">
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<span class="skip-nav" id="skip-navbar-top"></span></nav>
|
|
</header>
|
|
<div class="flex-content">
|
|
<main role="main">
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">playground</a></div>
|
|
<h1 title="Class Playground" class="title">Class Playground</h1>
|
|
</div>
|
|
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
|
|
<div class="inheritance">playground.Playground</div>
|
|
</div>
|
|
<section class="class-description" id="class-description">
|
|
<dl class="notes">
|
|
<dt>Direct Known Subclasses:</dt>
|
|
<dd><code><a href="SpaceInvadersLevel.html" title="class in playground">SpaceInvadersLevel</a></code></dd>
|
|
</dl>
|
|
<hr>
|
|
<div class="type-signature"><span class="modifiers">public abstract class </span><span class="element-name type-name-label">Playground</span>
|
|
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div>
|
|
<div class="block">Playground represents a level of the game, focusing on the game LOGIC, i.e., not so much on the
|
|
graphical representation. In particular, an instance of Playground
|
|
<ul>
|
|
<li>manages the different moving or static objects in a level (e.g., collisions, adding objects,
|
|
removing objects). This is mainly done by the methods <a href="#addObject(gameobjects.GameObject)"><code>addObject(gameobjects.GameObject)</code></a>, <a href="#deleteObject(java.lang.String)"><code>deleteObject(java.lang.String)</code></a>.
|
|
<li>processes keyboard inputs provided by GameLoop in <a href="#processKeyEvents(java.util.Stack)"><code>processKeyEvents(Stack)</code></a> and
|
|
<a href="#processMouseEvents(java.util.Stack)"><code>processMouseEvents(Stack)</code></a>
|
|
<li>represents the state of a level represented by <b>flags</b>. Each flag has a name (a String)
|
|
and an arbitrary value of any type. Methods: <a href="#setLevelFlag(java.lang.String,java.lang.Object)"><code>setLevelFlag(String, Object)</code></a>,
|
|
<a href="#getLevelFlag(java.lang.String)"><code>getLevelFlag(String)</code></a>. As an example, the current score is a flag usually named "points",
|
|
with an Integer as a value. This value can be retrieved and manipulated using the above mentioned
|
|
methods.
|
|
</ul></div>
|
|
</section>
|
|
<section class="summary">
|
|
<ul class="summary-list">
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
<li>
|
|
<section class="field-summary" id="field-summary">
|
|
<h2>Field Summary</h2>
|
|
<div class="caption"><span>Fields</span></div>
|
|
<div class="summary-table three-column-summary">
|
|
<div class="table-header col-first">Modifier and Type</div>
|
|
<div class="table-header col-second">Field</div>
|
|
<div class="table-header col-last">Description</div>
|
|
<div class="col-first even-row-color"><code>static final int</code></div>
|
|
<div class="col-second even-row-color"><code><a href="#FLAGS_ALL" class="member-name-link">FLAGS_ALL</a></code></div>
|
|
<div class="col-last even-row-color"> </div>
|
|
<div class="col-first odd-row-color"><code>static final int</code></div>
|
|
<div class="col-second odd-row-color"><code><a href="#FLAGS_GLOBAL" class="member-name-link">FLAGS_GLOBAL</a></code></div>
|
|
<div class="col-last odd-row-color"> </div>
|
|
<div class="col-first even-row-color"><code>static final int</code></div>
|
|
<div class="col-second even-row-color"><code><a href="#FLAGS_LEVEL" class="member-name-link">FLAGS_LEVEL</a></code></div>
|
|
<div class="col-last even-row-color"> </div>
|
|
</div>
|
|
</section>
|
|
</li>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<li>
|
|
<section class="constructor-summary" id="constructor-summary">
|
|
<h2>Constructor Summary</h2>
|
|
<div class="caption"><span>Constructors</span></div>
|
|
<div class="summary-table two-column-summary">
|
|
<div class="table-header col-first">Constructor</div>
|
|
<div class="table-header col-last">Description</div>
|
|
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">Playground</a>()</code></div>
|
|
<div class="col-last even-row-color"> </div>
|
|
</div>
|
|
</section>
|
|
</li>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<li>
|
|
<section class="method-summary" id="method-summary">
|
|
<h2>Method Summary</h2>
|
|
<div id="method-summary-table">
|
|
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
|
|
<div id="method-summary-table.tabpanel" role="tabpanel">
|
|
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
|
|
<div class="table-header col-first">Modifier and Type</div>
|
|
<div class="table-header col-second">Method</div>
|
|
<div class="table-header col-last">Description</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addObject(gameobjects.GameObject)" class="member-name-link">addObject</a><wbr>(<a href="../gameobjects/GameObject.html" title="class in gameobjects">GameObject</a> o)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Adds a graphics object to a level.</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addObjectNow(gameobjects.GameObject)" class="member-name-link">addObjectNow</a><wbr>(<a href="../gameobjects/GameObject.html" title="class in gameobjects">GameObject</a> o)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Adds a graphics object to a level.</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#applyGameLogic()" class="member-name-link">applyGameLogic</a>()</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
|
|
<div class="block">Method meant to be filled with own code, handles the entore game logic (collision checks, timed
|
|
events, ...).</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/util/LinkedList.html" title="class or interface in java.util" class="external-link">LinkedList</a><<a href="../gameobjects/GameObject.html" title="class in gameobjects">GameObject</a>></code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#collectObjects(java.lang.String,boolean)" class="member-name-link">collectObjects</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> substr,
|
|
boolean filterInactive)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Puts objects with a certain substring in their name into a LinkedLisrt and returns them.</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#deleteObject(java.lang.String)" class="member-name-link">deleteObject</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> id)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Removes a graphics object from a level.</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#deleteObjectNow(java.lang.String)" class="member-name-link">deleteObjectNow</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> id)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Removes a graphics object from a level immediately, CAUTION.</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract boolean</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#gameOver()" class="member-name-link">gameOver</a>()</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> </div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getGameTime()" class="member-name-link">getGameTime</a>()</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">returns time in seconds since level start</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getGlobalFlag(java.lang.String)" class="member-name-link">getGlobalFlag</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> flag)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
|
|
<div class="block">Retrieves a level-wide flag by name.</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/util/Stack.html" title="class or interface in java.util" class="external-link">Stack</a><<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.desktop/java/awt/event/KeyEvent.html" title="class or interface in java.awt.event" class="external-link">KeyEvent</a>></code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getKeyEvents()" class="member-name-link">getKeyEvents</a>()</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getLevelFlag(java.lang.String)" class="member-name-link">getLevelFlag</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> flag)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/util/Stack.html" title="class or interface in java.util" class="external-link">Stack</a><<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.desktop/java/awt/event/MouseEvent.html" title="class or interface in java.awt.event" class="external-link">MouseEvent</a>></code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMouseEvents()" class="member-name-link">getMouseEvents</a>()</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../gameobjects/GameObject.html" title="class in gameobjects">GameObject</a></code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getObject(java.lang.String)" class="member-name-link">getObject</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> id)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Retrieves a graphics object by name.</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getOrCreateGlobalFlag(java.lang.String,java.lang.Object)" class="member-name-link">getOrCreateGlobalFlag</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> flag,
|
|
<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> value)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
|
|
<div class="block">checks for existence and if not creates the new global flag with the given initial value.</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getOrCreateLevelFlag(java.lang.String,java.lang.Object)" class="member-name-link">getOrCreateLevelFlag</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> flag,
|
|
<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> createValue)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSizeX()" class="member-name-link">getSizeX</a>()</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSizeY()" class="member-name-link">getSizeY</a>()</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getTimestep()" class="member-name-link">getTimestep</a>()</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isPaused()" class="member-name-link">isPaused</a>()</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract boolean</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#levelFinished()" class="member-name-link">levelFinished</a>()</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> </div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract int</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#preferredSizeX()" class="member-name-link">preferredSizeX</a>()</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> </div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract int</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#preferredSizeY()" class="member-name-link">preferredSizeY</a>()</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> </div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#prepareLevel(java.lang.String)" class="member-name-link">prepareLevel</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> level)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
|
|
<div class="block">Sets up a single level.</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#processKeyEvents(java.util.Stack)" class="member-name-link">processKeyEvents</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/util/Stack.html" title="class or interface in java.util" class="external-link">Stack</a><<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.desktop/java/awt/event/KeyEvent.html" title="class or interface in java.awt.event" class="external-link">KeyEvent</a>> keyEvents)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Method meant to be filled with own code, processes Keyboard inputs.</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#processMouseEvents(java.util.Stack)" class="member-name-link">processMouseEvents</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/util/Stack.html" title="class or interface in java.util" class="external-link">Stack</a><<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.desktop/java/awt/event/MouseEvent.html" title="class or interface in java.awt.event" class="external-link">MouseEvent</a>> mouseEvents)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#redraw(java.awt.Graphics2D)" class="member-name-link">redraw</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.desktop/java/awt/Graphics2D.html" title="class or interface in java.awt" class="external-link">Graphics2D</a> g2)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Internal, do not call directly.</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#redrawLevel(java.awt.Graphics2D)" class="member-name-link">redrawLevel</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.desktop/java/awt/Graphics2D.html" title="class or interface in java.awt" class="external-link">Graphics2D</a> g2)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
|
|
<div class="block">To be redefined!!</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#reset()" class="member-name-link">reset</a>()</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Reinitializes the level.</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#resetFlags(int)" class="member-name-link">resetFlags</a><wbr>(int mode)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">mode can be: FLAGS_ALL (all), FLAGS_GLOBAL(global), FLAGs_LEVEL(level)</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setGameTime(double)" class="member-name-link">setGameTime</a><wbr>(double s)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">set the game time value (in seconds)</div>
|
|
</div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#setGlobalFlag(java.lang.String,java.lang.Object)" class="member-name-link">setGlobalFlag</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> flag,
|
|
<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> value)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
|
|
<div class="block">Sets a level-wide permanent flag.</div>
|
|
</div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setLevelFlag(java.lang.String,java.lang.Object)" class="member-name-link">setLevelFlag</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> flag,
|
|
<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> value)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setPaused(boolean)" class="member-name-link">setPaused</a><wbr>(boolean p)</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setTimestep(double)" class="member-name-link">setTimestep</a><wbr>(double s)</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
|
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#togglePause()" class="member-name-link">togglePause</a>()</code></div>
|
|
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
|
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
|
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#updateObjects()" class="member-name-link">updateObjects</a>()</code></div>
|
|
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
|
<div class="block">Calls all object update methods in level.</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="inherited-list">
|
|
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
|
|
<code><a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="details">
|
|
<ul class="details-list">
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
<li>
|
|
<section class="field-details" id="field-detail">
|
|
<h2>Field Details</h2>
|
|
<ul class="member-list">
|
|
<li>
|
|
<section class="detail" id="FLAGS_GLOBAL">
|
|
<h3>FLAGS_GLOBAL</h3>
|
|
<div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type">int</span> <span class="element-name">FLAGS_GLOBAL</span></div>
|
|
<dl class="notes">
|
|
<dt>See Also:</dt>
|
|
<dd>
|
|
<ul class="see-list">
|
|
<li><a href="../constant-values.html#playground.Playground.FLAGS_GLOBAL">Constant Field Values</a></li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="FLAGS_LEVEL">
|
|
<h3>FLAGS_LEVEL</h3>
|
|
<div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type">int</span> <span class="element-name">FLAGS_LEVEL</span></div>
|
|
<dl class="notes">
|
|
<dt>See Also:</dt>
|
|
<dd>
|
|
<ul class="see-list">
|
|
<li><a href="../constant-values.html#playground.Playground.FLAGS_LEVEL">Constant Field Values</a></li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="FLAGS_ALL">
|
|
<h3>FLAGS_ALL</h3>
|
|
<div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type">int</span> <span class="element-name">FLAGS_ALL</span></div>
|
|
<dl class="notes">
|
|
<dt>See Also:</dt>
|
|
<dd>
|
|
<ul class="see-list">
|
|
<li><a href="../constant-values.html#playground.Playground.FLAGS_ALL">Constant Field Values</a></li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<li>
|
|
<section class="constructor-details" id="constructor-detail">
|
|
<h2>Constructor Details</h2>
|
|
<ul class="member-list">
|
|
<li>
|
|
<section class="detail" id="<init>()">
|
|
<h3>Playground</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="element-name">Playground</span>()</div>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<li>
|
|
<section class="method-details" id="method-detail">
|
|
<h2>Method Details</h2>
|
|
<ul class="member-list">
|
|
<li>
|
|
<section class="detail" id="preferredSizeX()">
|
|
<h3>preferredSizeX</h3>
|
|
<div class="member-signature"><span class="modifiers">public abstract</span> <span class="return-type">int</span> <span class="element-name">preferredSizeX</span>()</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="preferredSizeY()">
|
|
<h3>preferredSizeY</h3>
|
|
<div class="member-signature"><span class="modifiers">public abstract</span> <span class="return-type">int</span> <span class="element-name">preferredSizeY</span>()</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="addObject(gameobjects.GameObject)">
|
|
<h3>addObject</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">addObject</span><wbr><span class="parameters">(<a href="../gameobjects/GameObject.html" title="class in gameobjects">GameObject</a> o)</span></div>
|
|
<div class="block">Adds a graphics object to a level.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>o</code> - GameObject The object to be added</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="addObjectNow(gameobjects.GameObject)">
|
|
<h3>addObjectNow</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">addObjectNow</span><wbr><span class="parameters">(<a href="../gameobjects/GameObject.html" title="class in gameobjects">GameObject</a> o)</span></div>
|
|
<div class="block">Adds a graphics object to a level.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>o</code> - GameObject The object to be added</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="collectObjects(java.lang.String,boolean)">
|
|
<h3>collectObjects</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/util/LinkedList.html" title="class or interface in java.util" class="external-link">LinkedList</a><<a href="../gameobjects/GameObject.html" title="class in gameobjects">GameObject</a>></span> <span class="element-name">collectObjects</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> substr,
|
|
boolean filterInactive)</span></div>
|
|
<div class="block">Puts objects with a certain substring in their name into a LinkedLisrt and returns them.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>substr</code> - The string that must be part of the object name if object is to be
|
|
considered found.</dd>
|
|
<dd><code>filterInactive</code> - if set true only active objects are considered.</dd>
|
|
<dt>Returns:</dt>
|
|
<dd>a reference to a LinkedList filled with all objects that have <b>substr</b> in their name</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="deleteObject(java.lang.String)">
|
|
<h3>deleteObject</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">deleteObject</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> id)</span></div>
|
|
<div class="block">Removes a graphics object from a level.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>id</code> - String The unique identifier of the object</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="deleteObjectNow(java.lang.String)">
|
|
<h3>deleteObjectNow</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">deleteObjectNow</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> id)</span></div>
|
|
<div class="block">Removes a graphics object from a level immediately, CAUTION.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>id</code> - String The unique identifier of the object</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getObject(java.lang.String)">
|
|
<h3>getObject</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../gameobjects/GameObject.html" title="class in gameobjects">GameObject</a></span> <span class="element-name">getObject</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> id)</span></div>
|
|
<div class="block">Retrieves a graphics object by name.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>id</code> - String Unique id of the object</dd>
|
|
<dt>Returns:</dt>
|
|
<dd>reference to the requested game object, or null if not found</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="setGlobalFlag(java.lang.String,java.lang.Object)">
|
|
<h3>setGlobalFlag</h3>
|
|
<div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name">setGlobalFlag</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> flag,
|
|
<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> value)</span></div>
|
|
<div class="block">Sets a level-wide permanent flag.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>flag</code> - String Q unique name in this level. If it exists value is overwritten.</dd>
|
|
<dd><code>value</code> - Object Any Object can be the value of a flag!</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="setLevelFlag(java.lang.String,java.lang.Object)">
|
|
<h3>setLevelFlag</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span> <span class="element-name">setLevelFlag</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> flag,
|
|
<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> value)</span></div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="resetFlags(int)">
|
|
<h3>resetFlags</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">resetFlags</span><wbr><span class="parameters">(int mode)</span></div>
|
|
<div class="block">mode can be: FLAGS_ALL (all), FLAGS_GLOBAL(global), FLAGs_LEVEL(level)</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>mode</code> - can be only one of <a href="#FLAGS_GLOBAL"><code>FLAGS_GLOBAL</code></a> <a href="#FLAGS_ALL"><code>FLAGS_ALL</code></a> or <a href="#FLAGS_LEVEL"><code>FLAGS_LEVEL</code></a></dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getGlobalFlag(java.lang.String)">
|
|
<h3>getGlobalFlag</h3>
|
|
<div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span> <span class="element-name">getGlobalFlag</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> flag)</span></div>
|
|
<div class="block">Retrieves a level-wide flag by name.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>flag</code> - String Unique flag id</dd>
|
|
<dt>Returns:</dt>
|
|
<dd>the value associated with <b>flag</b>, or <b>null</b> if the flag does not exist.</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getOrCreateGlobalFlag(java.lang.String,java.lang.Object)">
|
|
<h3>getOrCreateGlobalFlag</h3>
|
|
<div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span> <span class="element-name">getOrCreateGlobalFlag</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> flag,
|
|
<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> value)</span></div>
|
|
<div class="block">checks for existence and if not creates the new global flag with the given initial value. Returns
|
|
the value. afterwards it is guaranteed that no priorly existing value is overridden and that it
|
|
definitely exists (created if not present before).</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>flag</code> - String name for the global flag (created if not present)</dd>
|
|
<dd><code>value</code> - Object value to be stored (used only if flag was not present)</dd>
|
|
<dt>Returns:</dt>
|
|
<dd>the current value of the flag (maybe the initial one in case flag was not there before)</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getLevelFlag(java.lang.String)">
|
|
<h3>getLevelFlag</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span> <span class="element-name">getLevelFlag</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> flag)</span></div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getOrCreateLevelFlag(java.lang.String,java.lang.Object)">
|
|
<h3>getOrCreateLevelFlag</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span> <span class="element-name">getOrCreateLevelFlag</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> flag,
|
|
<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> createValue)</span></div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="reset()">
|
|
<h3>reset</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">reset</span>()</div>
|
|
<div class="block">Reinitializes the level.</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="isPaused()">
|
|
<h3>isPaused</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">isPaused</span>()</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="setPaused(boolean)">
|
|
<h3>setPaused</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setPaused</span><wbr><span class="parameters">(boolean p)</span></div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="togglePause()">
|
|
<h3>togglePause</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">togglePause</span>()</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="processKeyEvents(java.util.Stack)">
|
|
<h3>processKeyEvents</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">processKeyEvents</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/util/Stack.html" title="class or interface in java.util" class="external-link">Stack</a><<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.desktop/java/awt/event/KeyEvent.html" title="class or interface in java.awt.event" class="external-link">KeyEvent</a>> keyEvents)</span></div>
|
|
<div class="block">Method meant to be filled with own code, processes Keyboard inputs.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>keyEvents</code> - all collected <a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.desktop/java/awt/event/KeyEvent.html" title="class or interface in java.awt.event" class="external-link"><code>KeyEvent</code></a>s collected since last game loop.</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="processMouseEvents(java.util.Stack)">
|
|
<h3>processMouseEvents</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">processMouseEvents</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/util/Stack.html" title="class or interface in java.util" class="external-link">Stack</a><<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.desktop/java/awt/event/MouseEvent.html" title="class or interface in java.awt.event" class="external-link">MouseEvent</a>> mouseEvents)</span></div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getKeyEvents()">
|
|
<h3>getKeyEvents</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/util/Stack.html" title="class or interface in java.util" class="external-link">Stack</a><<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.desktop/java/awt/event/KeyEvent.html" title="class or interface in java.awt.event" class="external-link">KeyEvent</a>></span> <span class="element-name">getKeyEvents</span>()</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getMouseEvents()">
|
|
<h3>getMouseEvents</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/util/Stack.html" title="class or interface in java.util" class="external-link">Stack</a><<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.desktop/java/awt/event/MouseEvent.html" title="class or interface in java.awt.event" class="external-link">MouseEvent</a>></span> <span class="element-name">getMouseEvents</span>()</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="applyGameLogic()">
|
|
<h3>applyGameLogic</h3>
|
|
<div class="member-signature"><span class="modifiers">public abstract</span> <span class="return-type">void</span> <span class="element-name">applyGameLogic</span>()</div>
|
|
<div class="block">Method meant to be filled with own code, handles the entore game logic (collision checks, timed
|
|
events, ...).</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="prepareLevel(java.lang.String)">
|
|
<h3>prepareLevel</h3>
|
|
<div class="member-signature"><span class="modifiers">public abstract</span> <span class="return-type">void</span> <span class="element-name">prepareLevel</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> level)</span></div>
|
|
<div class="block">Sets up a single level. Prepares all objects etc.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>level</code> - String a string identifying the level number etc</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="gameOver()">
|
|
<h3>gameOver</h3>
|
|
<div class="member-signature"><span class="modifiers">public abstract</span> <span class="return-type">boolean</span> <span class="element-name">gameOver</span>()</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="levelFinished()">
|
|
<h3>levelFinished</h3>
|
|
<div class="member-signature"><span class="modifiers">public abstract</span> <span class="return-type">boolean</span> <span class="element-name">levelFinished</span>()</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getSizeX()">
|
|
<h3>getSizeX</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getSizeX</span>()</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getSizeY()">
|
|
<h3>getSizeY</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getSizeY</span>()</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="updateObjects()">
|
|
<h3>updateObjects</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">updateObjects</span>()</div>
|
|
<div class="block">Calls all object update methods in level. Internal, never call directly.</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="setTimestep(double)">
|
|
<h3>setTimestep</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setTimestep</span><wbr><span class="parameters">(double s)</span></div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getTimestep()">
|
|
<h3>getTimestep</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">double</span> <span class="element-name">getTimestep</span>()</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="setGameTime(double)">
|
|
<h3>setGameTime</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setGameTime</span><wbr><span class="parameters">(double s)</span></div>
|
|
<div class="block">set the game time value (in seconds)</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>s</code> - seconds the game is running</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="getGameTime()">
|
|
<h3>getGameTime</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">double</span> <span class="element-name">getGameTime</span>()</div>
|
|
<div class="block">returns time in seconds since level start</div>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="redrawLevel(java.awt.Graphics2D)">
|
|
<h3>redrawLevel</h3>
|
|
<div class="member-signature"><span class="modifiers">public abstract</span> <span class="return-type">void</span> <span class="element-name">redrawLevel</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.desktop/java/awt/Graphics2D.html" title="class or interface in java.awt" class="external-link">Graphics2D</a> g2)</span></div>
|
|
<div class="block">To be redefined!! Draws mainly h level background and global information like points etc.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>g2</code> - Graphics2D abstract drawing object of java Swing, used to carry out all drawing
|
|
operations.</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
<li>
|
|
<section class="detail" id="redraw(java.awt.Graphics2D)">
|
|
<h3>redraw</h3>
|
|
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">redraw</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/12/docs/api/java.desktop/java/awt/Graphics2D.html" title="class or interface in java.awt" class="external-link">Graphics2D</a> g2)</span></div>
|
|
<div class="block">Internal, do not call directly.</div>
|
|
<dl class="notes">
|
|
<dt>Parameters:</dt>
|
|
<dd><code>g2</code> - Graphics2D abstract drawing object of java Swing, used to carry out all drawing
|
|
operations.</dd>
|
|
</dl>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
</main>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|