mirror of
https://github.com/Reuh/ubiquitousse.git
synced 2025-10-27 17:19:31 +00:00
Update and rebuild docs
This commit is contained in:
parent
21679dde5c
commit
7ad5c2d641
19 changed files with 3026 additions and 949 deletions
|
|
@ -44,6 +44,7 @@
|
|||
<li><a href="../modules/ubiquitousse.html">ubiquitousse</a></li>
|
||||
<li><a href="../modules/asset.html">asset</a></li>
|
||||
<li><strong>ecs</strong></li>
|
||||
<li><a href="../modules/input.html">input</a></li>
|
||||
<li><a href="../modules/ldtk.html">ldtk</a></li>
|
||||
<li><a href="../modules/scene.html">scene</a></li>
|
||||
<li><a href="../modules/signal.html">signal</a></li>
|
||||
|
|
@ -279,6 +280,10 @@ end
|
|||
<td class="summary">Returns an iterator that iterate through the entties in this system, in order.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#System:get">System:get (i)</a></td>
|
||||
<td class="summary">Get the <code>i</code>th entity in the system.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#System:clear">System:clear ()</a></td>
|
||||
<td class="summary">Remove every entity from the system and its subsystems.</td>
|
||||
</tr>
|
||||
|
|
@ -410,7 +415,15 @@ end
|
|||
<strong>scene (name[, systems={}[, entities={}]])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
If <code>uqt.scene</code> is available, returns a new scene that will consist of a ECS world with the specified systems and entities.
|
||||
If <code>uqt.scene</code> is available, returns a new scene that will consist of a ECS world with the specified systems and entities. </p>
|
||||
|
||||
<p> When suspending and resuming the scene, the <code>onSuspend</code> and <code>onResume</code> events will be emitted on the ECS world.</p>
|
||||
|
||||
<p> Note that since <code>uqt.scene</code> use <a href="https://www.lua.org/manual/5.1/manual.html#pdf-require">require</a> to load the scenes, the scenes files will be cached – including variables defined in them.
|
||||
So if you store the entity list directly in a variable in the scene file, it will be reused every time the scene is entered, and will thus
|
||||
be shared among the different execution of the scene. This may be problematic if an entity is modified by one scene instance, as it will affect others
|
||||
(this should not be a problem with systems due to system instanciation). To avoid this issue, instead you would typically define entities through a
|
||||
function that will recreate the entities on every scene load.
|
||||
|
||||
<h3>Requires:</h3>
|
||||
<ul>
|
||||
|
|
@ -427,13 +440,13 @@ end
|
|||
the name of the new scene
|
||||
</li>
|
||||
<li><span class="parameter">systems</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
list of systems to add to the world
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table/function</a></span>
|
||||
list of systems to add to the world. If it is a function, it will be executed every time we enter the scene and returns the list of systems.
|
||||
(<em>default</em> {})
|
||||
</li>
|
||||
<li><span class="parameter">entities</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
list of entities to add to the world
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table/function</a></span>
|
||||
list of entities to add to the world. If it is a function, it will be executed every time we enter the scene and returns the list of entities.
|
||||
(<em>default</em> {})
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -1506,6 +1519,39 @@ avoid repeating your filters or allow controlling several system from a single p
|
|||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "System:get"></a>
|
||||
<strong>System:get (i)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get the <code>i</code>th entity in the system.
|
||||
This is a simple wrapper around <a href="../modules/ecs.html#System:iter">iter</a>; it <em>will</em> iterate over all the entities in the system in order until we reach the desired one.
|
||||
Complexity: O(i)
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">i</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
the index of the entity
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/ecs.html#Entity_objects">Entity</a></span>
|
||||
the entity; <code>nil</code> if there is no such entity in the system
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "System:clear"></a>
|
||||
|
|
@ -1683,7 +1729,7 @@ its sibling systems (i.e. completely stop the propagation of the event).</li>
|
|||
</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-12-27 17:22:39 </i>
|
||||
<i style="float:right;">Last updated 2022-09-16 20:07:07 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue