mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-05 13:53:54 -04:00
Deploying to gh-pages from @ Tjakka5/Concord@73177f4048 🚀
This commit is contained in:
parent
142ed2153f
commit
73851c87b0
17 changed files with 3937 additions and 0 deletions
204
classes/Assemblage.html
Normal file
204
classes/Assemblage.html
Normal file
|
@ -0,0 +1,204 @@
|
|||
<!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="#Methods">Methods</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><strong>Assemblage</strong></li>
|
||||
<li><a href="../classes/Component.html">Component</a></li>
|
||||
<li><a href="../classes/Entity.html">Entity</a></li>
|
||||
<li><a href="../classes/List.html">List</a></li>
|
||||
<li><a href="../classes/Pool.html">Pool</a></li>
|
||||
<li><a href="../classes/System.html">System</a></li>
|
||||
<li><a href="../classes/World.html">World</a></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/Assemblages.html">Assemblages</a></li>
|
||||
<li><a href="../modules/Components.html">Components</a></li>
|
||||
<li><a href="../modules/Concord.html">Concord</a></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/worlds.html">worlds</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>Assemblage</code></h1>
|
||||
<p>Gives an entity a set of components.</p>
|
||||
<p></p>
|
||||
|
||||
|
||||
<h2><a href="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Assemblage:new">Assemblage:new (assemble)</a></td>
|
||||
<td class="summary">Creates a new Assemblage.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Assemblage:assemble">Assemblage:assemble (e, ...)</a></td>
|
||||
<td class="summary">Assembles an Entity.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Assemblage:hasName">Assemblage:hasName ()</a></td>
|
||||
<td class="summary">Returns true if the Assemblage has a name.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Assemblage:getName">Assemblage:getName ()</a></td>
|
||||
<td class="summary">Returns the name of the Assemblage.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "Assemblage:new"></a>
|
||||
<strong>Assemblage:new (assemble)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new Assemblage.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">assemble</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
Function that assembles an Entity
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/Assemblage.html#">Assemblage</a></span>
|
||||
A new assemblage
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Assemblage:assemble"></a>
|
||||
<strong>Assemblage:assemble (e, ...)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Assembles an Entity.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">e</span>
|
||||
<span class="types"><a class="type" href="../classes/Entity.html#">Entity</a></span>
|
||||
Entity to assemble
|
||||
</li>
|
||||
<li><span class="parameter">...</span>
|
||||
additional arguments to pass to the assemble function
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/Assemblage.html#">Assemblage</a></span>
|
||||
self
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Assemblage:hasName"></a>
|
||||
<strong>Assemblage:hasName ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns true if the Assemblage has a name.
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Assemblage:getName"></a>
|
||||
<strong>Assemblage:getName ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the name of the Assemblage.
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</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 10:27:07 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
166
classes/Component.html
Normal file
166
classes/Component.html
Normal file
|
@ -0,0 +1,166 @@
|
|||
<!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="#Methods">Methods</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><strong>Component</strong></li>
|
||||
<li><a href="../classes/Entity.html">Entity</a></li>
|
||||
<li><a href="../classes/List.html">List</a></li>
|
||||
<li><a href="../classes/Pool.html">Pool</a></li>
|
||||
<li><a href="../classes/System.html">System</a></li>
|
||||
<li><a href="../classes/World.html">World</a></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/Components.html">Components</a></li>
|
||||
<li><a href="../modules/Concord.html">Concord</a></li>
|
||||
<li><a href="../modules/type.html">type</a></li>
|
||||
<li><a href="../modules/utils.html">utils</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>Component</code></h1>
|
||||
<p>A pure data container that is contained by a single entity.</p>
|
||||
<p></p>
|
||||
|
||||
|
||||
<h2><a href="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Component:new">Component:new (populate)</a></td>
|
||||
<td class="summary">Creates a new ComponentClass.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Component:hasName">Component:hasName ()</a></td>
|
||||
<td class="summary">Returns true if the Component has a name.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Component:getName">Component:getName ()</a></td>
|
||||
<td class="summary">Returns the name of the Component.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "Component:new"></a>
|
||||
<strong>Component:new (populate)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new ComponentClass.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">populate</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
Function that populates a Component with values
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/Component.html#">Component</a></span>
|
||||
A new ComponentClass
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Component:hasName"></a>
|
||||
<strong>Component:hasName ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns true if the Component has a name.
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Component:getName"></a>
|
||||
<strong>Component:getName ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the name of the Component.
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</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 2021-11-02 16:22:32 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
415
classes/Entity.html
Normal file
415
classes/Entity.html
Normal file
|
@ -0,0 +1,415 @@
|
|||
<!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="#Methods">Methods</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/Component.html">Component</a></li>
|
||||
<li><strong>Entity</strong></li>
|
||||
<li><a href="../classes/List.html">List</a></li>
|
||||
<li><a href="../classes/Pool.html">Pool</a></li>
|
||||
<li><a href="../classes/System.html">System</a></li>
|
||||
<li><a href="../classes/World.html">World</a></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/Components.html">Components</a></li>
|
||||
<li><a href="../modules/Concord.html">Concord</a></li>
|
||||
<li><a href="../modules/type.html">type</a></li>
|
||||
<li><a href="../modules/utils.html">utils</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>Entity</code></h1>
|
||||
<p>An object that exists in a world.</p>
|
||||
<p> An entity
|
||||
contains components which are processed by systems.</p>
|
||||
|
||||
|
||||
<h2><a href="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Entity:new">Entity:new ([world])</a></td>
|
||||
<td class="summary">Creates a new Entity.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Entity:give">Entity:give (componentClass, ...)</a></td>
|
||||
<td class="summary">Gives an Entity a Component.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Entity:ensure">Entity:ensure (componentClass, ...)</a></td>
|
||||
<td class="summary">Ensures an Entity to have a Component.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Entity:remove">Entity:remove (componentClass)</a></td>
|
||||
<td class="summary">Removes a Component from an Entity.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Entity:assemble">Entity:assemble (assemblage, ...)</a></td>
|
||||
<td class="summary">Assembles an Entity.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Entity:destroy">Entity:destroy ()</a></td>
|
||||
<td class="summary">Destroys the Entity.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Entity:has">Entity:has (componentClass)</a></td>
|
||||
<td class="summary">Returns true if the Entity has a Component.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Entity:get">Entity:get (componentClass)</a></td>
|
||||
<td class="summary">Gets a Component from the Entity.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Entity:getComponents">Entity:getComponents ()</a></td>
|
||||
<td class="summary">Returns a table of all Components the Entity has.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Entity:inWorld">Entity:inWorld ()</a></td>
|
||||
<td class="summary">Returns true if the Entity is in a World.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Entity:getWorld">Entity:getWorld ()</a></td>
|
||||
<td class="summary">Returns the World the Entity is in.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "Entity:new"></a>
|
||||
<strong>Entity:new ([world])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new Entity. Optionally adds it to a World.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">world</span>
|
||||
<span class="types"><a class="type" href="../classes/World.html#">World</a></span>
|
||||
World to add the entity to
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/Entity.html#">Entity</a></span>
|
||||
A new Entity
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Entity:give"></a>
|
||||
<strong>Entity:give (componentClass, ...)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Gives an Entity a Component.
|
||||
If the Component already exists, it's overridden by this new Component
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">componentClass</span>
|
||||
<span class="types"><a class="type" href="../classes/Component.html#">Component</a></span>
|
||||
ComponentClass to add an instance of
|
||||
</li>
|
||||
<li><span class="parameter">...</span>
|
||||
additional arguments to pass to the Component's populate function
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/Entity.html#">Entity</a></span>
|
||||
self
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Entity:ensure"></a>
|
||||
<strong>Entity:ensure (componentClass, ...)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Ensures an Entity to have a Component.
|
||||
If the Component already exists, no action is taken
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">componentClass</span>
|
||||
<span class="types"><a class="type" href="../classes/Component.html#">Component</a></span>
|
||||
ComponentClass to add an instance of
|
||||
</li>
|
||||
<li><span class="parameter">...</span>
|
||||
additional arguments to pass to the Component's populate function
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/Entity.html#">Entity</a></span>
|
||||
self
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Entity:remove"></a>
|
||||
<strong>Entity:remove (componentClass)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Removes a Component from an Entity.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">componentClass</span>
|
||||
<span class="types"><a class="type" href="../classes/Component.html#">Component</a></span>
|
||||
ComponentClass of the Component to remove
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/Entity.html#">Entity</a></span>
|
||||
self
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Entity:assemble"></a>
|
||||
<strong>Entity:assemble (assemblage, ...)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Assembles an Entity.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">assemblage</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
Function that will assemble an entity
|
||||
</li>
|
||||
<li><span class="parameter">...</span>
|
||||
additional arguments to pass to the assemblage function.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/Entity.html#">Entity</a></span>
|
||||
self
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Entity:destroy"></a>
|
||||
<strong>Entity:destroy ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Destroys the Entity.
|
||||
Removes the Entity from its World if it's in one.
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
self
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Entity:has"></a>
|
||||
<strong>Entity:has (componentClass)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns true if the Entity has a Component.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">componentClass</span>
|
||||
<span class="types"><a class="type" href="../classes/Component.html#">Component</a></span>
|
||||
ComponentClass of the Component to check
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Entity:get"></a>
|
||||
<strong>Entity:get (componentClass)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Gets a Component from the Entity.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">componentClass</span>
|
||||
<span class="types"><a class="type" href="../classes/Component.html#">Component</a></span>
|
||||
ComponentClass of the Component to get
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Entity:getComponents"></a>
|
||||
<strong>Entity:getComponents ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns a table of all Components the Entity has.
|
||||
Warning: Do not modify this table.
|
||||
Use Entity:give/ensure/remove instead
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
Table of all Components the Entity has
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Entity:inWorld"></a>
|
||||
<strong>Entity:inWorld ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns true if the Entity is in a World.
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Entity:getWorld"></a>
|
||||
<strong>Entity:getWorld ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the World the Entity is in.
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/World.html#">World</a></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</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 2021-11-02 16:22:32 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
287
classes/List.html
Normal file
287
classes/List.html
Normal file
|
@ -0,0 +1,287 @@
|
|||
<!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="#Methods">Methods</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/Component.html">Component</a></li>
|
||||
<li><a href="../classes/Entity.html">Entity</a></li>
|
||||
<li><strong>List</strong></li>
|
||||
<li><a href="../classes/Pool.html">Pool</a></li>
|
||||
<li><a href="../classes/System.html">System</a></li>
|
||||
<li><a href="../classes/World.html">World</a></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/Components.html">Components</a></li>
|
||||
<li><a href="../modules/Concord.html">Concord</a></li>
|
||||
<li><a href="../modules/type.html">type</a></li>
|
||||
<li><a href="../modules/utils.html">utils</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>List</code></h1>
|
||||
<p>Data structure that allows for fast removal at the cost of containing order.</p>
|
||||
<p></p>
|
||||
|
||||
|
||||
<h2><a href="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#List:new">List:new ()</a></td>
|
||||
<td class="summary">Creates a new List.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#List:add">List:add (obj)</a></td>
|
||||
<td class="summary">Adds an object to the List.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#List:remove">List:remove (obj)</a></td>
|
||||
<td class="summary">Removes an object from the List.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#List:clear">List:clear ()</a></td>
|
||||
<td class="summary">Clears the List completely.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#List:has">List:has (obj)</a></td>
|
||||
<td class="summary">Returns true if the List has the object.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#List:get">List:get (i)</a></td>
|
||||
<td class="summary">Returns the object at an index.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#List:indexOf">List:indexOf (obj)</a></td>
|
||||
<td class="summary">Returns the index of an object in the List.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "List:new"></a>
|
||||
<strong>List:new ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new List.
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/List.html#">List</a></span>
|
||||
A new List
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "List:add"></a>
|
||||
<strong>List:add (obj)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Adds an object to the List.
|
||||
Object must be of reference type
|
||||
Object may not be the string 'size'
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">obj</span>
|
||||
Object to add
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/List.html#">List</a></span>
|
||||
self
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "List:remove"></a>
|
||||
<strong>List:remove (obj)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Removes an object from the List.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">obj</span>
|
||||
Object to remove
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/List.html#">List</a></span>
|
||||
self
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "List:clear"></a>
|
||||
<strong>List:clear ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Clears the List completely.
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/List.html#">List</a></span>
|
||||
self
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "List:has"></a>
|
||||
<strong>List:has (obj)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns true if the List has the object.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">obj</span>
|
||||
Object to check for
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "List:get"></a>
|
||||
<strong>List:get (i)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the object at an index.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">i</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
Index to get from
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
Object at the index
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "List:indexOf"></a>
|
||||
<strong>List:indexOf (obj)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the index of an object in the List.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">obj</span>
|
||||
Object to get index of
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
index of object in the List.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</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 2021-11-02 16:22:32 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
257
classes/Pool.html
Normal file
257
classes/Pool.html
Normal file
|
@ -0,0 +1,257 @@
|
|||
<!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="#Methods">Methods</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/Component.html">Component</a></li>
|
||||
<li><a href="../classes/Entity.html">Entity</a></li>
|
||||
<li><a href="../classes/List.html">List</a></li>
|
||||
<li><strong>Pool</strong></li>
|
||||
<li><a href="../classes/System.html">System</a></li>
|
||||
<li><a href="../classes/World.html">World</a></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/Components.html">Components</a></li>
|
||||
<li><a href="../modules/Concord.html">Concord</a></li>
|
||||
<li><a href="../modules/type.html">type</a></li>
|
||||
<li><a href="../modules/utils.html">utils</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>Pool</code></h1>
|
||||
<p>Used to iterate over Entities with a specific Components
|
||||
A Pool contain a any amount of Entities.</p>
|
||||
<p></p>
|
||||
|
||||
|
||||
<h2><a href="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Pool:new">Pool:new (name, filter)</a></td>
|
||||
<td class="summary">Creates a new Pool</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Pool:eligible">Pool:eligible (e)</a></td>
|
||||
<td class="summary">Checks if an Entity is eligible for the Pool.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Pool:evaluate">Pool:evaluate (e)</a></td>
|
||||
<td class="summary">Evaluate whether an Entity should be added or removed from the Pool.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Pool:getName">Pool:getName ()</a></td>
|
||||
<td class="summary">Gets the name of the Pool</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Pool:getFilter">Pool:getFilter ()</a></td>
|
||||
<td class="summary">Gets the filter of the Pool.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Pool:onEntityAdded">Pool:onEntityAdded (e)</a></td>
|
||||
<td class="summary">Callback for when an Entity is added to the Pool.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "Pool:new"></a>
|
||||
<strong>Pool:new (name, filter)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new Pool
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">name</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
Name for the Pool.
|
||||
</li>
|
||||
<li><span class="parameter">filter</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
Table containing the required BaseComponents
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/Pool.html#">Pool</a></span>
|
||||
The new Pool
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Pool:eligible"></a>
|
||||
<strong>Pool:eligible (e)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Checks if an Entity is eligible for the Pool.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">e</span>
|
||||
<span class="types"><a class="type" href="../classes/Entity.html#">Entity</a></span>
|
||||
Entity to check
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Pool:evaluate"></a>
|
||||
<strong>Pool:evaluate (e)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Evaluate whether an Entity should be added or removed from the Pool.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">e</span>
|
||||
Entity to add or remove
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/Pool.html#">Pool</a></span>
|
||||
self
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Pool:getName"></a>
|
||||
<strong>Pool:getName ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Gets the name of the Pool
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Pool:getFilter"></a>
|
||||
<strong>Pool:getFilter ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Gets the filter of the Pool.
|
||||
Warning: Do not modify this filter.
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
Filter of the Pool.
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Pool:onEntityAdded"></a>
|
||||
<strong>Pool:onEntityAdded (e)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Callback for when an Entity is added to the Pool.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">e</span>
|
||||
<span class="types"><a class="type" href="../classes/Entity.html#">Entity</a></span>
|
||||
Entity that was added.
|
||||
</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 2021-11-02 16:22:32 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
315
classes/System.html
Normal file
315
classes/System.html
Normal file
|
@ -0,0 +1,315 @@
|
|||
<!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="#Methods">Methods</a></li>
|
||||
<li><a href="#Callbacks">Callbacks </a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/Component.html">Component</a></li>
|
||||
<li><a href="../classes/Entity.html">Entity</a></li>
|
||||
<li><a href="../classes/List.html">List</a></li>
|
||||
<li><a href="../classes/Pool.html">Pool</a></li>
|
||||
<li><strong>System</strong></li>
|
||||
<li><a href="../classes/World.html">World</a></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/Components.html">Components</a></li>
|
||||
<li><a href="../modules/Concord.html">Concord</a></li>
|
||||
<li><a href="../modules/type.html">type</a></li>
|
||||
<li><a href="../modules/utils.html">utils</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>System</code></h1>
|
||||
<p>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="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#System:new">System:new (table)</a></td>
|
||||
<td class="summary">Creates a new SystemClass.</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:hasName">System:hasName ()</a></td>
|
||||
<td class="summary">Returns true if the System has a name.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#System:getName">System:getName ()</a></td>
|
||||
<td class="summary">Returns the name of the System.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#Callbacks">Callbacks </a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#System:init">System:init (world)</a></td>
|
||||
<td class="summary">Callback for system initialization.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#System:onEnabled">System:onEnabled ()</a></td>
|
||||
<td class="summary">Callback for when a System is enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#System:onDisabled">System:onDisabled ()</a></td>
|
||||
<td class="summary">Callback for when a System is disabled.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "System:new"></a>
|
||||
<strong>System:new (table)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new SystemClass.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">table</span>
|
||||
filters A table containing filters (name = {components...})
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/System.html#">System</a></span>
|
||||
A new SystemClass
|
||||
</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>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/System.html#">System</a></span>
|
||||
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>
|
||||
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
|
||||
</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>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/World.html#">World</a></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "System:hasName"></a>
|
||||
<strong>System:hasName ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns true if the System has a name.
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "System:getName"></a>
|
||||
<strong>System:getName ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the name of the System.
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="Callbacks"></a>Callbacks </h2>
|
||||
|
||||
<dl class="function">
|
||||
<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>
|
||||
<span class="types"><a class="type" href="../classes/World.html#">World</a></span>
|
||||
The World the System was added to
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "System:onEnabled"></a>
|
||||
<strong>System:onEnabled ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Callback for when a System is enabled.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "System:onDisabled"></a>
|
||||
<strong>System:onDisabled ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Callback for when a System is disabled.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</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 2021-11-02 16:22:32 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
468
classes/World.html
Normal file
468
classes/World.html
Normal file
|
@ -0,0 +1,468 @@
|
|||
<!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="#Methods">Methods</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Classes</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../classes/Component.html">Component</a></li>
|
||||
<li><a href="../classes/Entity.html">Entity</a></li>
|
||||
<li><a href="../classes/List.html">List</a></li>
|
||||
<li><a href="../classes/Pool.html">Pool</a></li>
|
||||
<li><a href="../classes/System.html">System</a></li>
|
||||
<li><strong>World</strong></li>
|
||||
</ul>
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/Components.html">Components</a></li>
|
||||
<li><a href="../modules/Concord.html">Concord</a></li>
|
||||
<li><a href="../modules/type.html">type</a></li>
|
||||
<li><a href="../modules/utils.html">utils</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>World</code></h1>
|
||||
<p>A collection of Systems and Entities.</p>
|
||||
<p>
|
||||
A world emits to let Systems iterate.
|
||||
A World contains any amount of Systems.
|
||||
A World contains any amount of Entities.</p>
|
||||
|
||||
|
||||
<h2><a href="#Methods">Methods</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#World:new">World:new ()</a></td>
|
||||
<td class="summary">Creates a new World.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#World:addEntity">World:addEntity (e)</a></td>
|
||||
<td class="summary">Adds an Entity to the World.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#World:removeEntity">World:removeEntity (e)</a></td>
|
||||
<td class="summary">Removes an Entity from the World.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#World:addSystem">World:addSystem (systemClass)</a></td>
|
||||
<td class="summary">Adds a System to the World.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#World:addSystems">World:addSystems (...)</a></td>
|
||||
<td class="summary">Adds multiple Systems to the World.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#World:hasSystem">World:hasSystem (systemClass)</a></td>
|
||||
<td class="summary">Returns if the World has a System.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#World:getSystem">World:getSystem (systemClass)</a></td>
|
||||
<td class="summary">Gets a System from the World.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#World:emit">World:emit (functionName, ...)</a></td>
|
||||
<td class="summary">Emits a callback in the World.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#World:clear">World:clear ()</a></td>
|
||||
<td class="summary">Removes all entities from the World</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#World:hasName">World:hasName ()</a></td>
|
||||
<td class="summary">Returns true if the World has a name.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#World:getName">World:getName ()</a></td>
|
||||
<td class="summary">Returns the name of the World.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#World:onEntityAdded">World:onEntityAdded (e)</a></td>
|
||||
<td class="summary">Callback for when an Entity is added to the World.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#World:onEntityRemoved">World:onEntityRemoved (e)</a></td>
|
||||
<td class="summary">Callback for when an Entity is removed from the World.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "World:new"></a>
|
||||
<strong>World:new ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new World.
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/World.html#">World</a></span>
|
||||
The new World
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "World:addEntity"></a>
|
||||
<strong>World:addEntity (e)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Adds an Entity to the World.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">e</span>
|
||||
<span class="types"><a class="type" href="../classes/Entity.html#">Entity</a></span>
|
||||
Entity to add
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/World.html#">World</a></span>
|
||||
self
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "World:removeEntity"></a>
|
||||
<strong>World:removeEntity (e)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Removes an Entity from the World.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">e</span>
|
||||
<span class="types"><a class="type" href="../classes/Entity.html#">Entity</a></span>
|
||||
Entity to remove
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/World.html#">World</a></span>
|
||||
self
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "World:addSystem"></a>
|
||||
<strong>World:addSystem (systemClass)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Adds a System to the World.
|
||||
Callbacks are registered automatically
|
||||
Entities added before are added to the System retroactively
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">systemClass</span>
|
||||
<span class="types"><a class="type" href="../classes/System.html#">System</a></span>
|
||||
SystemClass of System to add
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/World.html#">World</a></span>
|
||||
self
|
||||
</ol>
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<a href="../classes/World.html#World:emit">World:emit</a>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "World:addSystems"></a>
|
||||
<strong>World:addSystems (...)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Adds multiple Systems to the World.
|
||||
Callbacks are registered automatically
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">...</span>
|
||||
SystemClasses of Systems to add
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/World.html#">World</a></span>
|
||||
self
|
||||
</ol>
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<li><a href="../classes/World.html#World:addSystem">World:addSystem</a></li>
|
||||
<li><a href="../classes/World.html#World:emit">World:emit</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "World:hasSystem"></a>
|
||||
<strong>World:hasSystem (systemClass)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns if the World has a System.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">systemClass</span>
|
||||
<span class="types"><a class="type" href="../classes/System.html#">System</a></span>
|
||||
SystemClass of System to check for
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "World:getSystem"></a>
|
||||
<strong>World:getSystem (systemClass)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Gets a System from the World.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">systemClass</span>
|
||||
<span class="types"><a class="type" href="../classes/System.html#">System</a></span>
|
||||
SystemClass of System to get
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/System.html#">System</a></span>
|
||||
System to get
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "World:emit"></a>
|
||||
<strong>World:emit (functionName, ...)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Emits a callback in the World.
|
||||
Calls all functions with the functionName of added Systems
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">functionName</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
Name of functions to call.
|
||||
</li>
|
||||
<li><span class="parameter">...</span>
|
||||
Parameters passed to System's functions
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/World.html#">World</a></span>
|
||||
self
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "World:clear"></a>
|
||||
<strong>World:clear ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Removes all entities from the World
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../classes/World.html#">World</a></span>
|
||||
self
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "World:hasName"></a>
|
||||
<strong>World:hasName ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns true if the World has a name.
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "World:getName"></a>
|
||||
<strong>World:getName ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the name of the World.
|
||||
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "World:onEntityAdded"></a>
|
||||
<strong>World:onEntityAdded (e)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Callback for when an Entity is added to the World.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">e</span>
|
||||
<span class="types"><a class="type" href="../classes/Entity.html#">Entity</a></span>
|
||||
The Entity that was added
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "World:onEntityRemoved"></a>
|
||||
<strong>World:onEntityRemoved (e)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Callback for when an Entity is removed from the World.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">e</span>
|
||||
<span class="types"><a class="type" href="../classes/Entity.html#">Entity</a></span>
|
||||
The Entity that was removed
|
||||
</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 2021-11-02 16:22:32 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue