Concord/docs/modules/system.html
2020-01-04 01:54:21 +01:00

398 lines
7.4 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Concord</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/assemblage.html">assemblage</a></li>
<li><a href="../modules/assemblages.html">assemblages</a></li>
<li><a href="../modules/component.html">component</a></li>
<li><a href="../modules/components.html">components</a></li>
<li><a href="../modules/entity.html">entity</a></li>
<li><a href="../modules/init.html">init</a></li>
<li><a href="../modules/list.html">list</a></li>
<li><a href="../modules/pool.html">pool</a></li>
<li><strong>system</strong></li>
<li><a href="../modules/systems.html">systems</a></li>
<li><a href="../modules/type.html">type</a></li>
<li><a href="../modules/utils.html">utils</a></li>
<li><a href="../modules/world.html">world</a></li>
<li><a href="../modules/worlds.html">worlds</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>system</code></h1>
<p>System
A System iterates over Entities.</p>
<p> From these Entities its get Components and modify them.
A System contains 1 or more Pools.
A System is contained by 1 World.</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#System.new">System.new (...)</a></td>
<td class="summary">Creates a new SystemClass.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#System.__buildPool">System.__buildPool (baseFilter)</a></td>
<td class="summary">Internal: Builds a Pool for the System.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#System:__evaluate">System:__evaluate (e)</a></td>
<td class="summary">Internal: Evaluates an Entity for all the System's Pools.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#System:__remove">System:__remove (e)</a></td>
<td class="summary">Internal: Removes an Entity from the System.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#System:clear">System:clear ()</a></td>
<td class="summary">Internal: Clears all Entities from the System.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#System:enable">System:enable ()</a></td>
<td class="summary">Enables the System.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#System:disable">System:disable ()</a></td>
<td class="summary">Disables the System.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#System:toggleEnable">System:toggleEnable ()</a></td>
<td class="summary">Toggles if the System is enabled.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#System:setEnabled">System:setEnabled (enable)</a></td>
<td class="summary">Sets if the System is enabled</td>
</tr>
<tr>
<td class="name" nowrap><a href="#System:isEnabled">System:isEnabled ()</a></td>
<td class="summary">Returns is the System is enabled</td>
</tr>
<tr>
<td class="name" nowrap><a href="#System:getWorld">System:getWorld ()</a></td>
<td class="summary">Returns the World the System is in.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#System:init">System:init (world)</a></td>
<td class="summary">Callback for system initialization.</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "System.new"></a>
<strong>System.new (...)</strong>
</dt>
<dd>
Creates a new SystemClass.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">...</span>
Variable amounts of filters
</li>
</ul>
<h3>Returns:</h3>
<ol>
A new SystemClass
</ol>
</dd>
<dt>
<a name = "System.__buildPool"></a>
<strong>System.__buildPool (baseFilter)</strong>
</dt>
<dd>
Internal: Builds a Pool for the System.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">baseFilter</span>
The 'raw' Filter
</li>
</ul>
<h3>Returns:</h3>
<ol>
A new Pool
</ol>
</dd>
<dt>
<a name = "System:__evaluate"></a>
<strong>System:__evaluate (e)</strong>
</dt>
<dd>
Internal: Evaluates an Entity for all the System's Pools.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">e</span>
The Entity to check
</li>
</ul>
<h3>Returns:</h3>
<ol>
self
</ol>
</dd>
<dt>
<a name = "System:__remove"></a>
<strong>System:__remove (e)</strong>
</dt>
<dd>
Internal: Removes an Entity from the System.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">e</span>
The Entity to remove
</li>
</ul>
<h3>Returns:</h3>
<ol>
self
</ol>
</dd>
<dt>
<a name = "System:clear"></a>
<strong>System:clear ()</strong>
</dt>
<dd>
Internal: Clears all Entities from the System.
<h3>Returns:</h3>
<ol>
self
</ol>
</dd>
<dt>
<a name = "System:enable"></a>
<strong>System:enable ()</strong>
</dt>
<dd>
Enables the System.
<h3>Returns:</h3>
<ol>
self
</ol>
</dd>
<dt>
<a name = "System:disable"></a>
<strong>System:disable ()</strong>
</dt>
<dd>
Disables the System.
<h3>Returns:</h3>
<ol>
self
</ol>
</dd>
<dt>
<a name = "System:toggleEnable"></a>
<strong>System:toggleEnable ()</strong>
</dt>
<dd>
Toggles if the System is enabled.
<h3>Returns:</h3>
<ol>
self
</ol>
</dd>
<dt>
<a name = "System:setEnabled"></a>
<strong>System:setEnabled (enable)</strong>
</dt>
<dd>
Sets if the System is enabled
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">enable</span>
Enable
</li>
</ul>
<h3>Returns:</h3>
<ol>
self
</ol>
</dd>
<dt>
<a name = "System:isEnabled"></a>
<strong>System:isEnabled ()</strong>
</dt>
<dd>
Returns is the System is enabled
<h3>Returns:</h3>
<ol>
True if the System is enabled, false otherwise
</ol>
</dd>
<dt>
<a name = "System:getWorld"></a>
<strong>System:getWorld ()</strong>
</dt>
<dd>
Returns the World the System is in.
<h3>Returns:</h3>
<ol>
The World the System is in
</ol>
</dd>
<dt>
<a name = "System:init"></a>
<strong>System:init (world)</strong>
</dt>
<dd>
Callback for system initialization.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">world</span>
The World the System was added to
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-01-04 00:43:06 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>