make the docs a little nicer

main changes:
- add parameter and return types where applicable
- use @module and @classmod tags at the top of files
- remove some redundant descriptions of return values, especially for functions that return a boolean

recommended next steps:
- more consistent grammar
- add links to classes and functions in descriptions where appropriate
- be consistent about naming Systems vs. SystemClasses and Components vs. ComponentClasses
This commit is contained in:
Andrew Minnich 2020-01-04 10:31:05 -05:00
parent 55ae5fd987
commit a65f88dd5e
31 changed files with 1474 additions and 1147 deletions

View file

@ -38,47 +38,50 @@
<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><strong>init</strong></li>
<li><a href="../modules/list.html">list</a></li>
<li><a href="../modules/pool.html">pool</a></li>
<li><a href="../modules/system.html">system</a></li>
<li><a href="../modules/systems.html">systems</a></li>
<li><a href="../modules/Assemblages.html">Assemblages</a></li>
<li><a href="../modules/Components.html">Components</a></li>
<li><strong>Concord</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>
<h2>Classes</h2>
<ul class="nowrap">
<li><a href="../classes/Assemblage.html">Assemblage</a></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>
</div>
<div id="content">
<h1>Module <code>init</code></h1>
<p>init</p>
<h1>Module <code>Concord</code></h1>
<p></p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Concord.loadComponents">Concord.loadComponents (pathOrFiles)</a></td>
<td class="name" nowrap><a href="#loadComponents">loadComponents (pathOrFiles)</a></td>
<td class="summary">Loads ComponentClasses and puts them in the Components container.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Concord.loadSystems">Concord.loadSystems (pathOrFiles)</a></td>
<td class="name" nowrap><a href="#loadSystems">loadSystems (pathOrFiles)</a></td>
<td class="summary">Loads SystemClasses and puts them in the Systems container.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Concord.loadWorlds">Concord.loadWorlds (pathOrFiles)</a></td>
<td class="name" nowrap><a href="#loadWorlds">loadWorlds (pathOrFiles)</a></td>
<td class="summary">Loads Worlds and puts them in the Worlds container.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Concord.loadAssemblages">Concord.loadAssemblages (pathOrFiles)</a></td>
<td class="name" nowrap><a href="#loadAssemblages">loadAssemblages (pathOrFiles)</a></td>
<td class="summary">Loads Assemblages and puts them in the Assemblages container.</td>
</tr>
</table>
@ -91,8 +94,8 @@
<dl class="function">
<dt>
<a name = "Concord.loadComponents"></a>
<strong>Concord.loadComponents (pathOrFiles)</strong>
<a name = "loadComponents"></a>
<strong>loadComponents (pathOrFiles)</strong>
</dt>
<dd>
Loads ComponentClasses and puts them in the Components container.
@ -113,8 +116,8 @@
</dd>
<dt>
<a name = "Concord.loadSystems"></a>
<strong>Concord.loadSystems (pathOrFiles)</strong>
<a name = "loadSystems"></a>
<strong>loadSystems (pathOrFiles)</strong>
</dt>
<dd>
Loads SystemClasses and puts them in the Systems container.
@ -135,8 +138,8 @@
</dd>
<dt>
<a name = "Concord.loadWorlds"></a>
<strong>Concord.loadWorlds (pathOrFiles)</strong>
<a name = "loadWorlds"></a>
<strong>loadWorlds (pathOrFiles)</strong>
</dt>
<dd>
Loads Worlds and puts them in the Worlds container.
@ -157,8 +160,8 @@
</dd>
<dt>
<a name = "Concord.loadAssemblages"></a>
<strong>Concord.loadAssemblages (pathOrFiles)</strong>
<a name = "loadAssemblages"></a>
<strong>loadAssemblages (pathOrFiles)</strong>
</dt>
<dd>
Loads Assemblages and puts them in the Assemblages container.
@ -185,7 +188,7 @@
</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>
<i style="float:right;">Last updated 2020-01-04 10:27:07 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View file

@ -1,147 +0,0 @@
<!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><strong>assemblage</strong></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><a href="../modules/system.html">system</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/world.html">world</a></li>
<li><a href="../modules/worlds.html">worlds</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>assemblage</code></h1>
<p>Assemblage
An Assemblage is a function that 'makes' an entity something.</p>
<p>
It does this by :give'ing or :ensure'ing Components, or by :assemble'ing the Entity.</p>
<h2><a href="#Functions">Functions</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>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</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>
Function that assembles an Entity
</li>
</ul>
<h3>Returns:</h3>
<ol>
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>
Entity to assemble
</li>
<li><span class="parameter">...</span>
Varargs to pass to the assemble function
@ return self
</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>

View file

@ -38,38 +38,48 @@
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/assemblage.html">assemblage</a></li>
<li><strong>assemblages</strong></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><a href="../modules/system.html">system</a></li>
<li><a href="../modules/systems.html">systems</a></li>
<li><strong>Assemblages</strong></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/world.html">world</a></li>
<li><a href="../modules/worlds.html">worlds</a></li>
</ul>
<h2>Classes</h2>
<ul class="nowrap">
<li><a href="../classes/Assemblage.html">Assemblage</a></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>
</div>
<div id="content">
<h1>Module <code>assemblages</code></h1>
<p>Assemblages
Container for registered Assemblages</p>
<h1>Module <code>Assemblages</code></h1>
<p>A container for registered <a href="../classes/Assemblage.html#">Assemblage</a>s</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Assemblages.register">Assemblages.register (name, assemblage)</a></td>
<td class="name" nowrap><a href="#register">register (name, assemblage)</a></td>
<td class="summary">Registers an Assemblage.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#has">has (name)</a></td>
<td class="summary">Returns true if the containter has an Assemblage with the specified name</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get">get (name)</a></td>
<td class="summary">Returns the Assemblage with the specified name</td>
</tr>
</table>
<br/>
@ -80,8 +90,8 @@
<dl class="function">
<dt>
<a name = "Assemblages.register"></a>
<strong>Assemblages.register (name, assemblage)</strong>
<a name = "register"></a>
<strong>register (name, assemblage)</strong>
</dt>
<dd>
Registers an Assemblage.
@ -90,9 +100,11 @@
<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 to register under
</li>
<li><span class="parameter">assemblage</span>
<span class="types"><a class="type" href="../classes/Assemblage.html#">Assemblage</a></span>
Assemblage to register
</li>
</ul>
@ -101,6 +113,60 @@
</dd>
<dt>
<a name = "has"></a>
<strong>has (name)</strong>
</dt>
<dd>
Returns true if the containter has an Assemblage with the specified name
<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 of the Assemblage to check
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">boolean</span></span>
</ol>
</dd>
<dt>
<a name = "get"></a>
<strong>get (name)</strong>
</dt>
<dd>
Returns the Assemblage with the specified name
<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 of the Assemblage to get
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../classes/Assemblage.html#">Assemblage</a></span>
</ol>
</dd>
</dl>
@ -109,7 +175,7 @@
</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>
<i style="float:right;">Last updated 2020-01-04 10:27:07 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View file

@ -1,166 +0,0 @@
<!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><strong>component</strong></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><a href="../modules/system.html">system</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/world.html">world</a></li>
<li><a href="../modules/worlds.html">worlds</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>component</code></h1>
<p>Component
A Component is a pure data container.</p>
<p>
A Component is contained by a single entity.</p>
<h2><a href="#Functions">Functions</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:__populate">Component:__populate ()</a></td>
<td class="summary">Internal: Populates a Component with values</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Component:__initialize">Component:__initialize (...)</a></td>
<td class="summary">Internal: Creates and populates a new Component.</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</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>
Function that populates a Component with values
</li>
</ul>
<h3>Returns:</h3>
<ol>
A new ComponentClass
</ol>
</dd>
<dt>
<a name = "Component:__populate"></a>
<strong>Component:__populate ()</strong>
</dt>
<dd>
Internal: Populates a Component with values
</dd>
<dt>
<a name = "Component:__initialize"></a>
<strong>Component:__initialize (...)</strong>
</dt>
<dd>
Internal: Creates and populates a new Component.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">...</span>
Varargs passed to the populate function
</li>
</ul>
<h3>Returns:</h3>
<ol>
A new populated Component
</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 00:43:06 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View file

@ -38,38 +38,48 @@
<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><strong>components</strong></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><a href="../modules/system.html">system</a></li>
<li><a href="../modules/systems.html">systems</a></li>
<li><a href="../modules/Assemblages.html">Assemblages</a></li>
<li><strong>Components</strong></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/world.html">world</a></li>
<li><a href="../modules/worlds.html">worlds</a></li>
</ul>
<h2>Classes</h2>
<ul class="nowrap">
<li><a href="../classes/Assemblage.html">Assemblage</a></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>
</div>
<div id="content">
<h1>Module <code>components</code></h1>
<p>Components
Container for registered ComponentClasss</p>
<h1>Module <code>Components</code></h1>
<p>Container for registered ComponentClasses</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Components.register">Components.register (name, componentClass)</a></td>
<td class="name" nowrap><a href="#register">register (name, componentClass)</a></td>
<td class="summary">Registers a ComponentClass.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#has">has (name)</a></td>
<td class="summary">Returns true if the containter has the ComponentClass with the specified name</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get">get (name)</a></td>
<td class="summary">Returns the ComponentClass with the specified name</td>
</tr>
</table>
<br/>
@ -80,8 +90,8 @@
<dl class="function">
<dt>
<a name = "Components.register"></a>
<strong>Components.register (name, componentClass)</strong>
<a name = "register"></a>
<strong>register (name, componentClass)</strong>
</dt>
<dd>
Registers a ComponentClass.
@ -90,9 +100,11 @@
<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 to register under
</li>
<li><span class="parameter">componentClass</span>
<span class="types"><a class="type" href="../classes/Component.html#">Component</a></span>
ComponentClass to register
</li>
</ul>
@ -101,6 +113,60 @@
</dd>
<dt>
<a name = "has"></a>
<strong>has (name)</strong>
</dt>
<dd>
Returns true if the containter has the ComponentClass with the specified name
<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 of the ComponentClass to check
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">boolean</span></span>
</ol>
</dd>
<dt>
<a name = "get"></a>
<strong>get (name)</strong>
</dt>
<dd>
Returns the ComponentClass with the specified name
<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 of the ComponentClass to get
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../classes/Component.html#">Component</a></span>
</ol>
</dd>
</dl>
@ -109,7 +175,7 @@
</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>
<i style="float:right;">Last updated 2020-01-04 10:27:07 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View file

@ -1,418 +0,0 @@
<!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><strong>entity</strong></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><a href="../modules/system.html">system</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/world.html">world</a></li>
<li><a href="../modules/worlds.html">worlds</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>entity</code></h1>
<p>Entity
Entities are the concrete objects that exist in your project.</p>
<p>
An Entity have Components and are processed by Systems.
An Entity is contained by a maximum of 1 World.</p>
<h2><a href="#Functions">Functions</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:__dirty">Entity:__dirty ()</a></td>
<td class="summary">Internal: Tells the World it's in that this Entity is dirty.</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="Functions"></a>Functions</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>
Optional World to add the entity to
</li>
</ul>
<h3>Returns:</h3>
<ol>
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>
ComponentClass to add an instance of
</li>
<li><span class="parameter">...</span>
varargs passed to the Component's populate function
</li>
</ul>
<h3>Returns:</h3>
<ol>
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>
ComponentClass to add an instance of
</li>
<li><span class="parameter">...</span>
varargs passed to the Component's populate function
</li>
</ul>
<h3>Returns:</h3>
<ol>
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>
ComponentClass of the Component to remove
</li>
</ul>
<h3>Returns:</h3>
<ol>
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>
Assemblage to assemble with
</li>
<li><span class="parameter">...</span>
Varargs to pass to the Assemblage's assemble function.
</li>
</ul>
</dd>
<dt>
<a name = "Entity:destroy"></a>
<strong>Entity:destroy ()</strong>
</dt>
<dd>
Destroys the Entity.
Removes the Entity from it's World if it's in one.
<h3>Returns:</h3>
<ol>
self
</ol>
</dd>
<dt>
<a name = "Entity:__dirty"></a>
<strong>Entity:__dirty ()</strong>
</dt>
<dd>
Internal: Tells the World it's in that this Entity is dirty.
<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>
ComponentClass of the Component to check
</li>
</ul>
<h3>Returns:</h3>
<ol>
True if the Entity has the Component, false otherwise
</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>
ComponentClass of the Component to get
</li>
</ul>
<h3>Returns:</h3>
<ol>
The Component
</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>
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>
True if the Entity is in a World, false otherwise
</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>
The World the Entity is in.
</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 00:43:06 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View file

@ -1,282 +0,0 @@
<!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><strong>list</strong></li>
<li><a href="../modules/pool.html">pool</a></li>
<li><a href="../modules/system.html">system</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/world.html">world</a></li>
<li><a href="../modules/worlds.html">worlds</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>list</code></h1>
<p>List
Data structure that allows for fast removal at the cost of containing order.</p>
<p></p>
<h2><a href="#Functions">Functions</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="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "List.new"></a>
<strong>List.new ()</strong>
</dt>
<dd>
Creates a new List.
<h3>Returns:</h3>
<ol>
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>
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>
self
</ol>
</dd>
<dt>
<a name = "List:__clear"></a>
<strong>List:__clear ()</strong>
</dt>
<dd>
Clears the List completely.
<h3>Returns:</h3>
<ol>
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>
True if the List has the object, false otherwise
</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>
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>
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 2020-01-04 00:43:06 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View file

@ -1,280 +0,0 @@
<!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><strong>pool</strong></li>
<li><a href="../modules/system.html">system</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/world.html">world</a></li>
<li><a href="../modules/worlds.html">worlds</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>pool</code></h1>
<p>Pool
A Pool is used to iterate over Entities with a specific Components
A Pool contain a any amount of Entities.</p>
<p></p>
<h2><a href="#Functions">Functions</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:__add">Pool:__add (e)</a></td>
<td class="summary">Internal: Adds an Entity to the Pool.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Pool:__remove">Pool:__remove (e)</a></td>
<td class="summary">Internal: Removed an Entity 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="Functions"></a>Functions</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>
Name for the Pool.
</li>
<li><span class="parameter">filter</span>
Table containing the required BaseComponents
</li>
</ul>
<h3>Returns:</h3>
<ol>
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>
Entity to check
</li>
</ul>
<h3>Returns:</h3>
<ol>
True if the entity is eligible, false otherwise
</ol>
</dd>
<dt>
<a name = "Pool:__add"></a>
<strong>Pool:__add (e)</strong>
</dt>
<dd>
Internal: Adds an Entity to the Pool.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">e</span>
Entity to add
</li>
</ul>
<h3>Returns:</h3>
<ol>
self
</ol>
</dd>
<dt>
<a name = "Pool:__remove"></a>
<strong>Pool:__remove (e)</strong>
</dt>
<dd>
Internal: Removed an Entity from the Pool.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">e</span>
Entity to remove
</li>
</ul>
<h3>Returns:</h3>
<ol>
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>
Name of the Pool.
</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>
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 2020-01-04 00:43:06 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View file

@ -1,398 +0,0 @@
<!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>

View file

@ -38,38 +38,48 @@
<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><a href="../modules/system.html">system</a></li>
<li><strong>systems</strong></li>
<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><strong>Systems</strong></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>
<h2>Classes</h2>
<ul class="nowrap">
<li><a href="../classes/Assemblage.html">Assemblage</a></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>
</div>
<div id="content">
<h1>Module <code>systems</code></h1>
<p>Systems
Container for registered SystemClasses</p>
<h1>Module <code>Systems</code></h1>
<p>Container for registered SystemClasses</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Systems.register">Systems.register (name, systemClass)</a></td>
<td class="name" nowrap><a href="#register">register (name, systemClass)</a></td>
<td class="summary">Registers a SystemClass.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#has">has (name)</a></td>
<td class="summary">Returns true if the containter has the SystemClass with the name</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get">get (name)</a></td>
<td class="summary">Returns the SystemClass with the name</td>
</tr>
</table>
<br/>
@ -80,8 +90,8 @@
<dl class="function">
<dt>
<a name = "Systems.register"></a>
<strong>Systems.register (name, systemClass)</strong>
<a name = "register"></a>
<strong>register (name, systemClass)</strong>
</dt>
<dd>
Registers a SystemClass.
@ -90,9 +100,11 @@
<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 to register under
</li>
<li><span class="parameter">systemClass</span>
<span class="types"><a class="type" href="../classes/System.html#">System</a></span>
SystemClass to register
</li>
</ul>
@ -101,6 +113,59 @@
</dd>
<dt>
<a name = "has"></a>
<strong>has (name)</strong>
</dt>
<dd>
Returns true if the containter has the SystemClass with the name
<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 of the SystemClass to check
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">boolean</span></span>
</ol>
</dd>
<dt>
<a name = "get"></a>
<strong>get (name)</strong>
</dt>
<dd>
Returns the SystemClass with the name
<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 of the SystemClass to get
</li>
</ul>
<h3>Returns:</h3>
<ol>
SystemClass with the name
</ol>
</dd>
</dl>
@ -109,7 +174,7 @@
</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>
<i style="float:right;">Last updated 2020-01-04 10:27:07 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View file

@ -38,21 +38,24 @@
<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><a href="../modules/system.html">system</a></li>
<li><a href="../modules/systems.html">systems</a></li>
<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><strong>type</strong></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>
<h2>Classes</h2>
<ul class="nowrap">
<li><a href="../classes/Assemblage.html">Assemblage</a></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>
</div>
@ -121,7 +124,8 @@
<h3>Returns:</h3>
<ol>
True if object is an Entity, false otherwise
<span class="types"><span class="type">boolean</span></span>
</ol>
@ -146,7 +150,8 @@
<h3>Returns:</h3>
<ol>
True if object is an ComponentClass, false otherwise
<span class="types"><span class="type">boolean</span></span>
</ol>
@ -171,7 +176,8 @@
<h3>Returns:</h3>
<ol>
True if object is an Component, false otherwise
<span class="types"><span class="type">boolean</span></span>
</ol>
@ -196,7 +202,8 @@
<h3>Returns:</h3>
<ol>
True if object is an SystemClass, false otherwise
<span class="types"><span class="type">boolean</span></span>
</ol>
@ -221,7 +228,8 @@
<h3>Returns:</h3>
<ol>
True if object is an System, false otherwise
<span class="types"><span class="type">boolean</span></span>
</ol>
@ -246,7 +254,8 @@
<h3>Returns:</h3>
<ol>
True if object is an World, false otherwise
<span class="types"><span class="type">boolean</span></span>
</ol>
@ -271,7 +280,8 @@
<h3>Returns:</h3>
<ol>
True if object is an Assemblage, false otherwise
<span class="types"><span class="type">boolean</span></span>
</ol>
@ -285,7 +295,7 @@
</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>
<i style="float:right;">Last updated 2020-01-04 10:27:07 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View file

@ -38,21 +38,24 @@
<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><a href="../modules/system.html">system</a></li>
<li><a href="../modules/systems.html">systems</a></li>
<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><strong>utils</strong></li>
<li><a href="../modules/world.html">world</a></li>
<li><a href="../modules/worlds.html">worlds</a></li>
</ul>
<h2>Classes</h2>
<ul class="nowrap">
<li><a href="../classes/Assemblage.html">Assemblage</a></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>
</div>
@ -109,7 +112,7 @@
</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>
<i style="float:right;">Last updated 2020-01-04 10:27:07 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View file

@ -1,453 +0,0 @@
<!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><a href="../modules/system.html">system</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><strong>world</strong></li>
<li><a href="../modules/worlds.html">worlds</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>world</code></h1>
<p>World
A World is a collection of Systems and Entities
A world emits to let Systems iterate
A World contains any amount of Systems
A World contains any amount of Entities</p>
<p></p>
<h2><a href="#Functions">Functions</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:__dirtyEntity">World:__dirtyEntity (e)</a></td>
<td class="summary">Internal: Marks an Entity as dirty.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#World:__flush">World:__flush ()</a></td>
<td class="summary">Internal: Flushes all changes to Entities.</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: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="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "World.new"></a>
<strong>World.new ()</strong>
</dt>
<dd>
Creates a new World.
<h3>Returns:</h3>
<ol>
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>
Entity to add
</li>
</ul>
<h3>Returns:</h3>
<ol>
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>
Entity to remove
</li>
</ul>
<h3>Returns:</h3>
<ol>
self
</ol>
</dd>
<dt>
<a name = "World:__dirtyEntity"></a>
<strong>World:__dirtyEntity (e)</strong>
</dt>
<dd>
Internal: Marks an Entity as dirty.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">e</span>
Entity to mark as dirty
</li>
</ul>
</dd>
<dt>
<a name = "World:__flush"></a>
<strong>World:__flush ()</strong>
</dt>
<dd>
Internal: Flushes all changes to Entities.
This processes all entities. Adding and removing entities, as well as reevaluating dirty entities.
<h3>Returns:</h3>
<ol>
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>
SystemClass of System to add
</li>
</ul>
<h3>Returns:</h3>
<ol>
self
</ol>
<h3>See also:</h3>
<ul>
<a href="../modules/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>
self
</ol>
<h3>See also:</h3>
<ul>
<li><a href="../modules/world.html#World:addSystem">World:addSystem</a></li>
<li><a href="../modules/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>
SystemClass of System to check for
</li>
</ul>
<h3>Returns:</h3>
<ol>
True if World has System, false otherwise
</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>
SystemClass of System to get
</li>
</ul>
<h3>Returns:</h3>
<ol>
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>
Name of functions to call.
</li>
<li><span class="parameter">...</span>
Parameters passed to System's functions
</li>
</ul>
<h3>Returns:</h3>
<ol>
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>
self
</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>
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>
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 2020-01-04 00:43:06 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View file

@ -38,21 +38,24 @@
<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><a href="../modules/system.html">system</a></li>
<li><a href="../modules/systems.html">systems</a></li>
<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/world.html">world</a></li>
<li><strong>worlds</strong></li>
</ul>
<h2>Classes</h2>
<ul class="nowrap">
<li><a href="../classes/Assemblage.html">Assemblage</a></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>
</div>
@ -70,6 +73,14 @@
<td class="name" nowrap><a href="#Worlds.register">Worlds.register (name, world)</a></td>
<td class="summary">Registers a World.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Worlds.has">Worlds.has (name)</a></td>
<td class="summary">Returns true if the containter has the World with the name</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Worlds.get">Worlds.get (name)</a></td>
<td class="summary">Returns the World with the name</td>
</tr>
</table>
<br/>
@ -90,6 +101,7 @@
<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 to register under
</li>
<li><span class="parameter">world</span>
@ -101,6 +113,59 @@
</dd>
<dt>
<a name = "Worlds.has"></a>
<strong>Worlds.has (name)</strong>
</dt>
<dd>
Returns true if the containter has the World with the name
<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 of the World to check
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">boolean</span></span>
</ol>
</dd>
<dt>
<a name = "Worlds.get"></a>
<strong>Worlds.get (name)</strong>
</dt>
<dd>
Returns the World with the name
<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 of the World to get
</li>
</ul>
<h3>Returns:</h3>
<ol>
World with the name
</ol>
</dd>
</dl>
@ -109,7 +174,7 @@
</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>
<i style="float:right;">Last updated 2020-01-04 10:27:07 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>