Update docs to 1.0.1

This commit is contained in:
bakpakin
2015-04-22 17:59:23 +08:00
parent 7e8c8735b8
commit d995a345d9
2 changed files with 44 additions and 36 deletions
+44 -36
View File
@@ -29,7 +29,6 @@
<h2>Contents</h2>
<ul>
<li><a href="#Fields">Fields</a></li>
<li><a href="#Filter_functions">Filter functions </a></li>
<li><a href="#System_functions">System functions </a></li>
<li><a href="#World_functions">World functions </a></li>
@@ -54,13 +53,6 @@
</ul>
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#tiny._VERSION">tiny._VERSION</a></td>
<td class="summary">Tiny-ecs Version, a period-separated three number string like "1.2.3"</td>
</tr>
</table>
<h2><a href="#Filter_functions">Filter functions </a></h2>
<table class="function_list">
<tr>
@@ -74,10 +66,13 @@
</table>
<h2><a href="#System_functions">System functions </a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#tiny.processingSystem">tiny.processingSystem (table)</a></td>
<td class="summary">Creates a Processing System.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#tiny.system">tiny.system (table)</a></td>
<td class="summary">Marks a table conforming to the System interface as a System recognized by
tiny-ecs.</td>
<td class="summary">Creates a System.</td>
</tr>
</table>
<h2><a href="#World_functions">World functions </a></h2>
@@ -164,24 +159,6 @@
<br/>
<h2><a name="Fields"></a>Fields</h2>
<dl class="function">
<dt>
<a name = "tiny._VERSION"></a>
<strong>tiny._VERSION</strong>
</dt>
<dd>
Tiny-ecs Version, a period-separated three number string like "1.2.3"
</dd>
</dl>
<h2><a name="Filter_functions"></a>Filter functions </h2>
@@ -235,17 +212,48 @@
A System is a wrapper around function callbacks for manipulating Entities.
<dl class="function">
<dt>
<a name = "tiny.processingSystem"></a>
<strong>tiny.processingSystem (table)</strong>
</dt>
<dd>
Creates a Processing System. A Processing System iterates through its
Entities in no particluar order, and updates them individually. It has two
important fields, <code>function system:process(entity, dt)</code>, and <code>function
system:filter(entity)</code>. <code>entities</code> is an unordered table of Entities with
Entities as KEYS, and <code>dt</code> is the delta time. There are also a few other
optional callbacks:
<code>function system:preProcess(entities, dt)</code> - returns nil,
<code>function system:postProcess(entities, dt)</code> - returns nil,
<code>function system:onAdd(entity)</code> - returns nil,
<code>function system:onRemove(entity)</code> - returns nil.
For Filters, it is conveient to use <a href="index.html#tiny.requireAll">tiny.requireAll</a> or <a href="index.html#tiny.requireOne">tiny.requireOne</a>,
but one can write their own filters as well.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">table</span>
A table to be used as a System, or <code>nil</code> to create a new
Processing System.
</li>
</ul>
</dd>
<dt>
<a name = "tiny.system"></a>
<strong>tiny.system (table)</strong>
</dt>
<dd>
Marks a table conforming to the System interface as a System recognized by
tiny-ecs. Systems are tables that contain at least one field, an update
function that takes parameters like so:
<code>function system:update(world, entities, dt)</code>. <a href="index.html#tiny.world">world</a> is the World the System
belongs to, <code>entities</code> is an unordered table of Entities with Entities as KEYS,
and <code>dt</code> is the delta time. There are also a few other optional callbacks:
Creates a System. Systems are tables that contain at least one field;
an update function that takes parameters like so:
<code>function system:update(entities, dt)</code>. <code>entities</code> is an unordered table of
Entities with Entities as KEYS, and <code>dt</code> is the delta time. There are also a
few other optional callbacks:
<code>function system:filter(entity)</code> - returns a boolean,
<code>function system:onAdd(entity)</code> - returns nil,
<code>function system:onRemove(entity)</code> - returns nil.
@@ -256,7 +264,7 @@
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">table</span>
A table to be used as System, or <code>nil</code> to create a new System.
A table to be used as a System, or <code>nil</code> to create a new System.
</li>
</ul>
@@ -738,7 +746,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-04-21 21:58:31 </i>
<i style="float:right;">Last updated 2015-04-22 17:58:12 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
View File