1
0
Fork 0
mirror of https://github.com/Reuh/ubiquitousse.git synced 2025-10-27 09:09:30 +00:00

ecs: removed .entity in components, components do not need to be tables, pass entity as a new argument in several callbacks, remove System.methods, add System:callback, System:emit and System:reorder, add System.w, improve documentation

The component methods system was awkward and didn't give much benefit compared to just using methods on Systems. Plus now we really only have data in entities.

Since we don't have component methods, the callback system had to be replaced; I integrated it with the default System methods since it's a relatively common behavior.
This commit is contained in:
Étienne Fildadut 2021-12-26 18:35:16 +01:00
parent af3bd51cb3
commit 9d2e886609
15 changed files with 407 additions and 246 deletions

View file

@ -108,7 +108,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 2021-12-26 18:13:01 </i>
<i style="float:right;">Last updated 2021-12-26 18:43:30 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View file

@ -334,7 +334,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 2021-12-26 18:13:01 </i>
<i style="float:right;">Last updated 2021-12-26 18:43:30 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View file

@ -1597,7 +1597,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-26 18:13:01 </i>
<i style="float:right;">Last updated 2021-12-26 18:43:30 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View file

@ -1754,7 +1754,7 @@ end
Level background. </p>
<p> If there is a background image, <code>background.image</code> contains a table <code>{image=image, x=number, y=number, sx=number, sy=number}</code>
where <a href="../modules/ldtk.html#Tileset.image">image</a> is the LÖVE image (or image filepath if LÖVE not available) <a href="../modules/ldtk.html#Entity.x">x</a> and <a href="../modules/ldtk.html#Tile.y">y</a> are the top-left position,
where <a href="../modules/ldtk.html#Tileset.image">image</a> is the LÖVE image (or image filepath if LÖVE not available) <a href="../modules/ldtk.html#Tile.x">x</a> and <a href="../modules/ldtk.html#Level.y">y</a> are the top-left position,
and <a href="../modules/ldtk.html#Entity.sx">sx</a> and <a href="../modules/ldtk.html#Entity.sy">sy</a> the horizontal and vertical scale factors.
</ul>
@ -1829,7 +1829,7 @@ end
<li>Enum are converted into a Lua string giving the currently selected enum value.</li>
<li>Filepath are converted into a Lua string giving the file path.</li>
<li>Arrays are converted into a Lua table with the elements in it as a list.</li>
<li>Points are converted into a Lua table with the fields <a href="../modules/ldtk.html#Entity.x">x</a> and <a href="../modules/ldtk.html#Tile.y">y</a>: <code>{ x=number, y=number }</code>.</li>
<li>Points are converted into a Lua table with the fields <a href="../modules/ldtk.html#Tile.x">x</a> and <a href="../modules/ldtk.html#Level.y">y</a>: <code>{ x=number, y=number }</code>.</li>
<li>Colors are converted into a Lua table with the red, green and blue components in [0-1] as a list: <code>{r,g,b}</code>.</li>
</ul>
@ -1855,7 +1855,7 @@ end
</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-26 18:13:01 </i>
<i style="float:right;">Last updated 2021-12-26 18:43:30 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View file

@ -702,7 +702,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 2021-12-26 18:13:01 </i>
<i style="float:right;">Last updated 2021-12-26 18:43:30 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View file

@ -414,7 +414,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 2021-12-26 18:13:01 </i>
<i style="float:right;">Last updated 2021-12-26 18:43:30 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View file

@ -1153,7 +1153,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 2021-12-26 18:13:01 </i>
<i style="float:right;">Last updated 2021-12-26 18:43:30 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View file

@ -228,6 +228,7 @@
</dt>
<dd>
Input management, if available.
TODO: not currently generated with LDoc.
</ul>
</ul>
@ -361,7 +362,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 2021-12-26 18:13:01 </i>
<i style="float:right;">Last updated 2021-12-26 18:43:30 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View file

@ -784,7 +784,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 2021-12-26 18:13:01 </i>
<i style="float:right;">Last updated 2021-12-26 18:43:30 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View file

@ -64,7 +64,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 2021-12-26 18:13:01 </i>
<i style="float:right;">Last updated 2021-12-26 18:43:30 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View file

@ -71,7 +71,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 2021-12-26 18:13:01 </i>
<i style="float:right;">Last updated 2021-12-26 18:43:30 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>