mirror of
https://github.com/Reuh/ubiquitousse.git
synced 2025-10-27 17:19:31 +00:00
Add LDoc for scene, timer, signal, util
This commit is contained in:
parent
23f797286b
commit
d9eba04966
21 changed files with 3209 additions and 109 deletions
|
|
@ -33,9 +33,13 @@
|
|||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="modules/ubiquitousse.html">ubiquitousse</a></li>
|
||||
<li><a href="modules/ldtk.html">ldtk</a></li>
|
||||
<li><a href="modules/ecs.html">ecs</a></li>
|
||||
<li><a href="modules/asset.html">asset</a></li>
|
||||
<li><a href="modules/ecs.html">ecs</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>
|
||||
<li><a href="modules/timer.html">timer</a></li>
|
||||
<li><a href="modules/util.html">util</a></li>
|
||||
</ul>
|
||||
<h2>Topics</h2>
|
||||
<ul class="">
|
||||
|
|
@ -51,7 +55,7 @@
|
|||
<h2>Ubiquitousse game development tools</h2>
|
||||
<p>Set of Lua libraries to make game development easier using the <a href="https://love2d.org/">LÖVE</a> game framework.</p>
|
||||
|
||||
<p>See <a href="modules/init.html">main module</a> for more information, or the <a href="https://github.com/Reuh/ubiquitousse">GitHub page</a> for the source.</p>
|
||||
<p>See <a href="modules/ubiquitousse.html">main module</a> for more information, or the <a href="https://github.com/Reuh/ubiquitousse">GitHub page</a> for the source.</p>
|
||||
|
||||
<h2>Modules</h2>
|
||||
<table class="module_list">
|
||||
|
|
@ -60,8 +64,8 @@
|
|||
<td class="summary">Ubiquitousse main module.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/ldtk.html">ldtk</a></td>
|
||||
<td class="summary"><a href="https://ldtk.io/">LDtk</a> level importer for Lua and drawing using LÖVE.</td>
|
||||
<td class="name" nowrap><a href="modules/asset.html">asset</a></td>
|
||||
<td class="summary">Asset manager.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/ecs.html">ecs</a></td>
|
||||
|
|
@ -70,8 +74,24 @@
|
|||
<p> Entity Component System library, inspired by the excellent tiny-ecs.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/asset.html">asset</a></td>
|
||||
<td class="summary">Asset manager.</td>
|
||||
<td class="name" nowrap><a href="modules/ldtk.html">ldtk</a></td>
|
||||
<td class="summary"><a href="https://ldtk.io/">LDtk</a> level importer for Lua and drawing using LÖVE.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/scene.html">scene</a></td>
|
||||
<td class="summary">Scene management.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/signal.html">signal</a></td>
|
||||
<td class="summary">Signal management.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/timer.html">timer</a></td>
|
||||
<td class="summary">Time related functions.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/util.html">util</a></td>
|
||||
<td class="summary">Various functions useful for game developement.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Topics</h2>
|
||||
|
|
@ -90,7 +110,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-25 19:17:08 </i>
|
||||
<i style="float:right;">Last updated 2021-12-25 20:46:24 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -41,9 +41,13 @@
|
|||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/ubiquitousse.html">ubiquitousse</a></li>
|
||||
<li><a href="../modules/ldtk.html">ldtk</a></li>
|
||||
<li><a href="../modules/ecs.html">ecs</a></li>
|
||||
<li><strong>asset</strong></li>
|
||||
<li><a href="../modules/ecs.html">ecs</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>
|
||||
<li><a href="../modules/timer.html">timer</a></li>
|
||||
<li><a href="../modules/util.html">util</a></li>
|
||||
</ul>
|
||||
<h2>Topics</h2>
|
||||
<ul class="">
|
||||
|
|
@ -325,7 +329,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-25 19:17:08 </i>
|
||||
<i style="float:right;">Last updated 2021-12-25 20:46:24 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -42,9 +42,13 @@
|
|||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/ubiquitousse.html">ubiquitousse</a></li>
|
||||
<li><a href="../modules/ldtk.html">ldtk</a></li>
|
||||
<li><strong>ecs</strong></li>
|
||||
<li><a href="../modules/asset.html">asset</a></li>
|
||||
<li><strong>ecs</strong></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>
|
||||
<li><a href="../modules/timer.html">timer</a></li>
|
||||
<li><a href="../modules/util.html">util</a></li>
|
||||
</ul>
|
||||
<h2>Topics</h2>
|
||||
<ul class="">
|
||||
|
|
@ -73,7 +77,7 @@
|
|||
<p> No mandatory dependency.
|
||||
Optional dependency: <a href="../modules/ubiquitousse.html#scene">ubiquitousse.scene</a>, to allow quick creation of ECS-based scenes.</p>
|
||||
|
||||
<p> The module returns a table that contains several functions, <a href="../modules/ecs.html#world">world</a> or <a href="../modules/ecs.html#scene">scene</a> are starting points
|
||||
<p> The module returns a table that contains several functions, <a href="../modules/ecs.html#world">world</a> or <a href="../modules/scene.html#">scene</a> are starting points
|
||||
to create your world.</p>
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
|
|
@ -1361,7 +1365,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-25 19:17:08 </i>
|
||||
<i style="float:right;">Last updated 2021-12-25 20:46:24 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -47,9 +47,13 @@
|
|||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/ubiquitousse.html">ubiquitousse</a></li>
|
||||
<li><strong>ldtk</strong></li>
|
||||
<li><a href="../modules/ecs.html">ecs</a></li>
|
||||
<li><a href="../modules/asset.html">asset</a></li>
|
||||
<li><a href="../modules/ecs.html">ecs</a></li>
|
||||
<li><strong>ldtk</strong></li>
|
||||
<li><a href="../modules/scene.html">scene</a></li>
|
||||
<li><a href="../modules/signal.html">signal</a></li>
|
||||
<li><a href="../modules/timer.html">timer</a></li>
|
||||
<li><a href="../modules/util.html">util</a></li>
|
||||
</ul>
|
||||
<h2>Topics</h2>
|
||||
<ul class="">
|
||||
|
|
@ -71,7 +75,7 @@
|
|||
<p> This modules returns a single function, <a href="../modules/ldtk.html#LDtk">LDtk</a>(path).</p>
|
||||
|
||||
<p> No mandatory dependency.
|
||||
Requires LÖVE <code>love.graphics</code> (drawing Image, SpriteBatch, Quad) for drawing only.</p>
|
||||
Optionally requires LÖVE <code>love.graphics</code> (drawing Image, SpriteBatch, Quad) for drawing only.</p>
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">local ldtk = require("ubiquitousse.ldtk")
|
||||
|
|
@ -1583,7 +1587,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#IntTile.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#Entity.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>
|
||||
|
|
@ -1640,7 +1644,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-25 19:17:08 </i>
|
||||
<i style="float:right;">Last updated 2021-12-25 20:46:24 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
|||
679
docs/modules/scene.html
Normal file
679
docs/modules/scene.html
Normal file
|
|
@ -0,0 +1,679 @@
|
|||
<!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>Ubiquitousse reference</title>
|
||||
<link rel="stylesheet" href="../ldoc_new.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>Ubiquitousse</h1>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Scene_objects">Scene objects </a></li>
|
||||
<li><a href="#Module">Module </a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/ubiquitousse.html">ubiquitousse</a></li>
|
||||
<li><a href="../modules/asset.html">asset</a></li>
|
||||
<li><a href="../modules/ecs.html">ecs</a></li>
|
||||
<li><a href="../modules/ldtk.html">ldtk</a></li>
|
||||
<li><strong>scene</strong></li>
|
||||
<li><a href="../modules/signal.html">signal</a></li>
|
||||
<li><a href="../modules/timer.html">timer</a></li>
|
||||
<li><a href="../modules/util.html">util</a></li>
|
||||
</ul>
|
||||
<h2>Topics</h2>
|
||||
<ul class="">
|
||||
<li><a href="../topics/README.md.html">README</a></li>
|
||||
<li><a href="../topics/LICENSE.html">LICENSE</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>scene</code></h1>
|
||||
<p>Scene management.</p>
|
||||
<p><p> You can use use scenes to seperate the different states of your game: for example, a menu scene and a game scene.
|
||||
This module is fully implemented in Ubiquitousse and is mostly a “recommended way” of organising an Ubiquitousse-based game.
|
||||
However, you don’t have to use this if you don’t want to. ubiquitousse.scene handles all the differents Ubiquitousse-states and
|
||||
make them scene-independent, for example by creating a scene-specific TimerRegistry (TimedFunctions that are keept accross
|
||||
states are generally a bad idea). Theses scene-specific states should be created and available in the table returned by
|
||||
ubiquitousse.scene.new.</p>
|
||||
|
||||
<p> The expected code-organisation is:</p>
|
||||
|
||||
<ul>
|
||||
<li>each scene is in a file, identified by its module name (scenes will be loaded using require(“modulename”))</li>
|
||||
<li>each scene file create a new scene table using ubiquitousse.scene.new and returns it at the end of the file</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p> Order of callbacks:</p>
|
||||
|
||||
<ul>
|
||||
<li>all scene change callbacks are called after setting scene.current to the new scene but before changing scene.stack</li>
|
||||
<li>all scene exit/suspend callbacks are called before scene enter/resume callbacks</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p> No mendatory dependency.
|
||||
Optional dependencies:</p>
|
||||
|
||||
<ul>
|
||||
<li>ubiquitousse.timer (to provide each scene a timer registry).</li>
|
||||
<li>ubiquitousse.signal (to bind to update and draw signal in signal.event).</li>
|
||||
</ul>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a href="#Scene_objects">Scene objects </a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Scene.name">Scene.name</a></td>
|
||||
<td class="summary">The scene name.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Scene.timer">Scene.timer</a></td>
|
||||
<td class="summary">Scene-specific TimerRegistry, if uqt.time is available.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Scene.signal">Scene.signal</a></td>
|
||||
<td class="summary">Scene-specific SignalRegistry, if uqt.signal is available.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Scene:enter">Scene:enter (...) <sup><em>[callback]</em></sup></a></td>
|
||||
<td class="summary">Called when entering a scene.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Scene:exit">Scene:exit () <sup><em>[callback]</em></sup></a></td>
|
||||
<td class="summary">Called when exiting a scene, and not expecting to come back (scene may be unloaded).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Scene:suspend">Scene:suspend () <sup><em>[callback]</em></sup></a></td>
|
||||
<td class="summary">Called when suspending a scene, and expecting to come back (scene won’t be unloaded).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Scene:resume">Scene:resume () <sup><em>[callback]</em></sup></a></td>
|
||||
<td class="summary">Called when resuming a suspended scene (after calling suspend).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Scene:update">Scene:update (dt, ...) <sup><em>[callback]</em></sup></a></td>
|
||||
<td class="summary">Called on each update on the current scene.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Scene:draw">Scene:draw (...) <sup><em>[callback]</em></sup></a></td>
|
||||
<td class="summary">Called on each draw on the current scene.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#Module">Module </a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#current">current</a></td>
|
||||
<td class="summary">The current scene object.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#timer">timer</a></td>
|
||||
<td class="summary">Shortcut for scene.current.timer.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#signal">signal</a></td>
|
||||
<td class="summary">Shortcut for scene.current.signal.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#stack">stack</a></td>
|
||||
<td class="summary">The scene stack: list of scene, from the farest one to the nearest.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#prefix">prefix</a></td>
|
||||
<td class="summary">A prefix for scene modules names.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#new">new ([name="unamed"])</a></td>
|
||||
<td class="summary">Creates and returns a new Scene object.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#switch">switch (scenePath, ...)</a></td>
|
||||
<td class="summary">Switch to a new scene.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#push">push (scenePath, ...)</a></td>
|
||||
<td class="summary">Push a new scene to the scene stack.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#pop">pop ()</a></td>
|
||||
<td class="summary">Pop the current scene from the scene stack.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#popAll">popAll ()</a></td>
|
||||
<td class="summary">Pop all scenes.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#update">update (dt, ...)</a></td>
|
||||
<td class="summary">Update the current scene.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#draw">draw (...)</a></td>
|
||||
<td class="summary">Draw the current scene.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header has-description"><a name="Scene_objects"></a>Scene objects </h2>
|
||||
|
||||
<div class="section-description">
|
||||
Scene object.
|
||||
</div>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "Scene.name"></a>
|
||||
<strong>Scene.name</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
The scene name.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Scene.timer"></a>
|
||||
<strong>Scene.timer</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Scene-specific TimerRegistry, if uqt.time is available.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Scene.signal"></a>
|
||||
<strong>Scene.signal</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Scene-specific SignalRegistry, if uqt.signal is available.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Scene:enter"></a>
|
||||
<strong>Scene:enter (...) <sup><em>[callback]</em></sup></strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Called when entering a scene.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">...</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Scene:exit"></a>
|
||||
<strong>Scene:exit () <sup><em>[callback]</em></sup></strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Called when exiting a scene, and not expecting to come back (scene may be unloaded).
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Scene:suspend"></a>
|
||||
<strong>Scene:suspend () <sup><em>[callback]</em></sup></strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Called when suspending a scene, and expecting to come back (scene won’t be unloaded).
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Scene:resume"></a>
|
||||
<strong>Scene:resume () <sup><em>[callback]</em></sup></strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Called when resuming a suspended scene (after calling suspend).
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Scene:update"></a>
|
||||
<strong>Scene:update (dt, ...) <sup><em>[callback]</em></sup></strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Called on each update on the current scene.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">dt</span>
|
||||
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">...</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Scene:draw"></a>
|
||||
<strong>Scene:draw (...) <sup><em>[callback]</em></sup></strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Called on each draw on the current scene.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">...</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="Module"></a>Module </h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "current"></a>
|
||||
<strong>current</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
The current scene object.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "timer"></a>
|
||||
<strong>timer</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Shortcut for scene.current.timer.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "signal"></a>
|
||||
<strong>signal</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Shortcut for scene.current.signal.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "stack"></a>
|
||||
<strong>stack</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
The scene stack: list of scene, from the farest one to the nearest.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "prefix"></a>
|
||||
<strong>prefix</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
A prefix for scene modules names.
|
||||
Will search in the “scene” directory by default (<code>prefix="scene."</code>). Redefine it to fit your own ridiculous filesystem.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "new"></a>
|
||||
<strong>new ([name="unamed"])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates and returns a new Scene object.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<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>
|
||||
the new scene name
|
||||
(<em>default</em> "unamed")
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/scene.html#Scene_objects">Scene</a></span>
|
||||
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "switch"></a>
|
||||
<strong>switch (scenePath, ...)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Switch to a new scene.
|
||||
The new scene will be required() and the current scene will be replaced by the new one,
|
||||
then the previous scene exit function will be called, then the enter callback is called on the new scence.
|
||||
Then the stack is changed to replace the old scene with the new one.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">scenePath</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string/table</a></span>
|
||||
the new scene module name, or the scene table directly
|
||||
</li>
|
||||
<li><span class="parameter">...</span>
|
||||
arguments to pass to the scene’s enter function
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "push"></a>
|
||||
<strong>push (scenePath, ...)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Push a new scene to the scene stack.
|
||||
Similar to ubiquitousse.scene.switch, except suspend is called on the current scene instead of exit,
|
||||
and the current scene is not replaced: when the new scene call ubiquitousse.scene.pop, the old scene
|
||||
will be reused.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">scenePath</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string/table</a></span>
|
||||
the new scene module name, or the scene table directly
|
||||
</li>
|
||||
<li><span class="parameter">...</span>
|
||||
arguments to pass to the scene’s enter function
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "pop"></a>
|
||||
<strong>pop ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Pop the current scene from the scene stack.
|
||||
The previous scene will be set as the current scene, then the current scene exit function will be called,
|
||||
then the previous scene resume function will be called, and then the current scene will be removed from the stack.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "popAll"></a>
|
||||
<strong>popAll ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Pop all scenes.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "update"></a>
|
||||
<strong>update (dt, ...)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Update the current scene.
|
||||
Should be called at every game update. If ubiquitousse.signal is available, will be bound to the “update” signal in signal.event.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">dt</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
the delta-time (milisecond)
|
||||
</li>
|
||||
<li><span class="parameter">...</span>
|
||||
arguments to pass to the scene’s update function after dt
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "draw"></a>
|
||||
<strong>draw (...)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Draw the current scene.
|
||||
Should be called every time the game is draw. If ubiquitousse.signal is available, will be bound to the “draw” signal in signal.event.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">...</span>
|
||||
arguments to pass to the scene’s draw function
|
||||
</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-12-25 20:46:24 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
410
docs/modules/signal.html
Normal file
410
docs/modules/signal.html
Normal file
|
|
@ -0,0 +1,410 @@
|
|||
<!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>Ubiquitousse reference</title>
|
||||
<link rel="stylesheet" href="../ldoc_new.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>Ubiquitousse</h1>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#Module">Module </a></li>
|
||||
<li><a href="#SignalRegistry_objects">SignalRegistry objects </a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/ubiquitousse.html">ubiquitousse</a></li>
|
||||
<li><a href="../modules/asset.html">asset</a></li>
|
||||
<li><a href="../modules/ecs.html">ecs</a></li>
|
||||
<li><a href="../modules/ldtk.html">ldtk</a></li>
|
||||
<li><a href="../modules/scene.html">scene</a></li>
|
||||
<li><strong>signal</strong></li>
|
||||
<li><a href="../modules/timer.html">timer</a></li>
|
||||
<li><a href="../modules/util.html">util</a></li>
|
||||
</ul>
|
||||
<h2>Topics</h2>
|
||||
<ul class="">
|
||||
<li><a href="../topics/README.md.html">README</a></li>
|
||||
<li><a href="../topics/LICENSE.html">LICENSE</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>signal</code></h1>
|
||||
<p>Signal management.</p>
|
||||
<p> No dependency.</p>
|
||||
|
||||
|
||||
<h2><a href="#Module">Module </a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#new">new ()</a></td>
|
||||
<td class="summary">Creates and return a new SignalRegistry.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#event">event</a></td>
|
||||
<td class="summary">SignalRegistry which will be used to bind signals that need to be called on game engine event; other ubiquitousse modules may bind to this registry
|
||||
if avaible.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#registerEvents">registerEvents ()</a></td>
|
||||
<td class="summary">Call this function to hook <a href="../modules/signal.html#event">signal.event</a> signals to LÖVE events.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#SignalRegistry_objects">SignalRegistry objects </a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#SignalRegistry.signals">SignalRegistry.signals</a></td>
|
||||
<td class="summary">Map of signals to list of listeners.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#SignalRegistry:bind">SignalRegistry:bind (name, fn, ...)</a></td>
|
||||
<td class="summary">Bind one or several functions to a signal name.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#SignalRegistry:unbind">SignalRegistry:unbind (name, fn, ...)</a></td>
|
||||
<td class="summary">Unbind one or several functions to a signal name.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#SignalRegistry:unbindAll">SignalRegistry:unbindAll (name)</a></td>
|
||||
<td class="summary">Remove every bound function to a signal name.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#SignalRegistry:replace">SignalRegistry:replace (name, sourceFn, destFn)</a></td>
|
||||
<td class="summary">Replace a bound function with another function.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#SignalRegistry:clear">SignalRegistry:clear ()</a></td>
|
||||
<td class="summary">Remove every bound function to every signal.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#SignalRegistry:emit">SignalRegistry:emit (name, ...)</a></td>
|
||||
<td class="summary">Emit a signal, i.e.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Module"></a>Module </h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "new"></a>
|
||||
<strong>new ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates and return a new SignalRegistry.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="../modules/signal.html#SignalRegistry_objects">SignalRegistry</a></span>
|
||||
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "event"></a>
|
||||
<strong>event</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>SignalRegistry which will be used to bind signals that need to be called on game engine event; other ubiquitousse modules may bind to this registry
|
||||
if avaible. </p>
|
||||
|
||||
<p> For example, every ubiquitousse module with a “update” function will bind it to the “update” signal in the registry;
|
||||
you can then call this signal on each game update to update every ubiquitousse module easily.</p>
|
||||
|
||||
<p> Provided signals:</p>
|
||||
|
||||
<ul>
|
||||
<li><code>update(dt)</code>, should be called on every game update</li>
|
||||
<li><code>draw()</code>, should be called on every game draw</li>
|
||||
<li>for LÖVE, there are callbacks for every LÖVE callback function that need to be called on their corresponding LÖVE callback</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "registerEvents"></a>
|
||||
<strong>registerEvents ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Call this function to hook <a href="../modules/signal.html#event">signal.event</a> signals to LÖVE events.
|
||||
This means overriding every existing LÖVE callback. If a callback is already defined, the new one will call the old function along with the signal:emit.
|
||||
|
||||
<h3>Requires:</h3>
|
||||
<ul>
|
||||
love
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header has-description"><a name="SignalRegistry_objects"></a>SignalRegistry objects </h2>
|
||||
|
||||
<div class="section-description">
|
||||
Signal registry. </p>
|
||||
|
||||
<p> A SignalRegistry is a separate ubiquitousse.signal instance: its signals will be independant from other registries.
|
||||
</div>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "SignalRegistry.signals"></a>
|
||||
<strong>SignalRegistry.signals</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Map of signals to list of listeners.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "SignalRegistry:bind"></a>
|
||||
<strong>SignalRegistry:bind (name, fn, ...)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Bind one or several functions to a signal name.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">name</span>
|
||||
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">fn</span>
|
||||
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">...</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "SignalRegistry:unbind"></a>
|
||||
<strong>SignalRegistry:unbind (name, fn, ...)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Unbind one or several functions to a signal name.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">name</span>
|
||||
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">fn</span>
|
||||
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">...</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "SignalRegistry:unbindAll"></a>
|
||||
<strong>SignalRegistry:unbindAll (name)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Remove every bound function to a signal name.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">name</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "SignalRegistry:replace"></a>
|
||||
<strong>SignalRegistry:replace (name, sourceFn, destFn)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Replace a bound function with another function.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">name</span>
|
||||
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">sourceFn</span>
|
||||
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">destFn</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "SignalRegistry:clear"></a>
|
||||
<strong>SignalRegistry:clear ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Remove every bound function to every signal.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "SignalRegistry:emit"></a>
|
||||
<strong>SignalRegistry:emit (name, ...)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Emit a signal, i.e. call every function bound to it, with the given arguments.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">name</span>
|
||||
|
||||
|
||||
</li>
|
||||
<li><span class="parameter">...</span>
|
||||
|
||||
|
||||
</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-12-25 20:46:24 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
1054
docs/modules/timer.html
Normal file
1054
docs/modules/timer.html
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -40,9 +40,13 @@
|
|||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><strong>ubiquitousse</strong></li>
|
||||
<li><a href="../modules/ldtk.html">ldtk</a></li>
|
||||
<li><a href="../modules/ecs.html">ecs</a></li>
|
||||
<li><a href="../modules/asset.html">asset</a></li>
|
||||
<li><a href="../modules/ecs.html">ecs</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>
|
||||
<li><a href="../modules/timer.html">timer</a></li>
|
||||
<li><a href="../modules/util.html">util</a></li>
|
||||
</ul>
|
||||
<h2>Topics</h2>
|
||||
<ul class="">
|
||||
|
|
@ -282,7 +286,7 @@
|
|||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<a href="../modules/ubiquitousse.html#scene">scene</a>
|
||||
<a href="../modules/scene.html#">scene</a>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
@ -304,7 +308,7 @@
|
|||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<a href="../modules/ubiquitousse.html#signal">signal</a>
|
||||
<a href="../modules/signal.html#">signal</a>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
@ -326,7 +330,7 @@
|
|||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<a href="../modules/ubiquitousse.html#timer">timer</a>
|
||||
<a href="../modules/timer.html#">timer</a>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
@ -348,7 +352,7 @@
|
|||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<a href="../modules/ubiquitousse.html#util">util</a>
|
||||
<a href="../modules/util.html#">util</a>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
@ -360,7 +364,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-25 19:17:08 </i>
|
||||
<i style="float:right;">Last updated 2021-12-25 20:46:24 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
|||
786
docs/modules/util.html
Normal file
786
docs/modules/util.html
Normal file
|
|
@ -0,0 +1,786 @@
|
|||
<!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>Ubiquitousse reference</title>
|
||||
<link rel="stylesheet" href="../ldoc_new.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>Ubiquitousse</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/ubiquitousse.html">ubiquitousse</a></li>
|
||||
<li><a href="../modules/asset.html">asset</a></li>
|
||||
<li><a href="../modules/ecs.html">ecs</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>
|
||||
<li><a href="../modules/timer.html">timer</a></li>
|
||||
<li><strong>util</strong></li>
|
||||
</ul>
|
||||
<h2>Topics</h2>
|
||||
<ul class="">
|
||||
<li><a href="../topics/README.md.html">README</a></li>
|
||||
<li><a href="../topics/LICENSE.html">LICENSE</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Module <code>util</code></h1>
|
||||
<p>Various functions useful for game developement.</p>
|
||||
<p> No dependency.</p>
|
||||
|
||||
|
||||
<h2><a href="#Functions">Functions </a></h2>
|
||||
<table class="function_list">
|
||||
</table>
|
||||
<h3 class="doc-title"><a href="#math">Basic maths</a></h3>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#aabb">aabb (x1, y1, w1, h1, x2, y2, w2, h2)</a></td>
|
||||
<td class="summary">AABB collision check.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3 class="doc-title"><a href="#list">List operations</a></h3>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#has">has (t, v)</a></td>
|
||||
<td class="summary">Check if the list contains a value.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#remove">remove (t, x[, n=#t])</a></td>
|
||||
<td class="summary">Remove the first occurence of an element in a list.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#extract">extract (t, k[, n=#t])</a></td>
|
||||
<td class="summary">Extract the list of elements with a specific key from a list of tables</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#ipairs">ipairs (a, b[, ...])</a></td>
|
||||
<td class="summary">Chainable ipairs.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#each">each (t, fn[, n=#t])</a></td>
|
||||
<td class="summary">Applies a function to every item in list t.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#map">map (t, fn[, n=#t])</a></td>
|
||||
<td class="summary">Applies a function to every item in list t and returns the associated new list.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#all">all (t, fn[, n=#t])</a></td>
|
||||
<td class="summary">Test if all the values in the list are true.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#any">any (t, fn[, n=#t])</a></td>
|
||||
<td class="summary">Test if at least one value in the list is true.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3 class="doc-title"><a href="#dict">Dictionary operations</a></h3>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#invert">invert (t)</a></td>
|
||||
<td class="summary">Returns a new table where the keys and values have been inverted.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#copy">copy (t)</a></td>
|
||||
<td class="summary">Perform a deep copy of a table.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#requirer">requirer ([prefix=""])</a></td>
|
||||
<td class="summary">Returns a table which, when indexed, will require() the module with the index as a name (and a optional prefix).</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3 class="doc-title"><a href="#random">Random and UUID</a></h3>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#uuid4">uuid4 ()</a></td>
|
||||
<td class="summary">Generate a UUID v4.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3 class="doc-title"><a href="#grouping">Object grouping</a></h3>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#group">group (list[, n=#t[, p=nil]])</a></td>
|
||||
<td class="summary">Groups objects in a meta-object-proxy-thingy.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions </h2>
|
||||
|
||||
<dl class="function">
|
||||
</dl>
|
||||
<h3 class="doc-title"><a name = "math"></a>Basic maths</h3>
|
||||
<div class="doc-description">
|
||||
|
||||
|
||||
</div>
|
||||
<dl class="function">
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "aabb"></a>
|
||||
<strong>aabb (x1, y1, w1, h1, x2, y2, w2, h2)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
AABB collision check.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">x1</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
first rectangle top-left x coordinate
|
||||
</li>
|
||||
<li><span class="parameter">y1</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
first rectangle top-left y coordinate
|
||||
</li>
|
||||
<li><span class="parameter">w1</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
first rectangle width
|
||||
</li>
|
||||
<li><span class="parameter">h1</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
first rectangle height
|
||||
</li>
|
||||
<li><span class="parameter">x2</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
second rectangle top-left x coordinate
|
||||
</li>
|
||||
<li><span class="parameter">y2</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
second rectangle top-left y coordinate
|
||||
</li>
|
||||
<li><span class="parameter">w2</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
second rectangle width
|
||||
</li>
|
||||
<li><span class="parameter">h2</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
second rectangle height
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">true</span></span>
|
||||
if the objects collide, false otherwise
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h3 class="doc-title"><a name = "list"></a>List operations</h3>
|
||||
<div class="doc-description">
|
||||
|
||||
|
||||
</div>
|
||||
<dl class="function">
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "has"></a>
|
||||
<strong>has (t, v)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Check if the list contains a value.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">t</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
the list
|
||||
</li>
|
||||
<li><span class="parameter">v</span>
|
||||
value to search
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">bool</span></span>
|
||||
true if is in list, false otherwise
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "remove"></a>
|
||||
<strong>remove (t, x[, n=#t])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Remove the first occurence of an element in a list.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">t</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
the list
|
||||
</li>
|
||||
<li><span class="parameter">x</span>
|
||||
the element to remove
|
||||
</li>
|
||||
<li><span class="parameter">n</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
the number of expected elements in the list, including nil values
|
||||
(<em>default</em> #t)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
x the removed element
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "extract"></a>
|
||||
<strong>extract (t, k[, n=#t])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Extract the list of elements with a specific key from a list of tables
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">t</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
the list of tables
|
||||
</li>
|
||||
<li><span class="parameter">k</span>
|
||||
the chosen key
|
||||
</li>
|
||||
<li><span class="parameter">n</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
the number of expected elements in the list, including nil values
|
||||
(<em>default</em> #t)
|
||||
</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>
|
||||
the extracted table
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "ipairs"></a>
|
||||
<strong>ipairs (a, b[, ...])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Chainable ipairs.
|
||||
Same as ipairs, but can take several tables, which will be chained, in order.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">a</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
first list to iterate over
|
||||
</li>
|
||||
<li><span class="parameter">b</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
second list to iterate over after the first one
|
||||
</li>
|
||||
<li><span class="parameter">...</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table,...</a></span>
|
||||
next tables to iterate over
|
||||
(<em>optional</em>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "each"></a>
|
||||
<strong>each (t, fn[, n=#t])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Applies a function to every item in list t.
|
||||
The function receive two argument: the value and then the key.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">t</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
initial list
|
||||
</li>
|
||||
<li><span class="parameter">fn</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
the function to apply
|
||||
</li>
|
||||
<li><span class="parameter">n</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
the number of expected elements in the list, including nil values
|
||||
(<em>default</em> #t)
|
||||
</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>
|
||||
the initial list
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "map"></a>
|
||||
<strong>map (t, fn[, n=#t])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Applies a function to every item in list t and returns the associated new list.
|
||||
The function receive two argument: the value and then the key.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">t</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
initial list
|
||||
</li>
|
||||
<li><span class="parameter">fn</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
the function to apply
|
||||
</li>
|
||||
<li><span class="parameter">n</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
the number of expected elements in the list, including nil values
|
||||
(<em>default</em> #t)
|
||||
</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>
|
||||
the new list
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "all"></a>
|
||||
<strong>all (t, fn[, n=#t])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Test if all the values in the list are true. Optionnaly applies a function to get the truthness.
|
||||
The function receive two argument: the value and then the key.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">t</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
initial list
|
||||
</li>
|
||||
<li><span class="parameter">fn</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
the function to apply
|
||||
</li>
|
||||
<li><span class="parameter">n</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
the number of expected elements in the list, including nil values
|
||||
(<em>default</em> #t)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
result
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "any"></a>
|
||||
<strong>any (t, fn[, n=#t])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Test if at least one value in the list is true. Optionnaly applies a function to get the truthness.
|
||||
The function receive two argument: the value and then the key.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">t</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
initial list
|
||||
</li>
|
||||
<li><span class="parameter">fn</span>
|
||||
<span class="types"><span class="type">function</span></span>
|
||||
the function to apply
|
||||
</li>
|
||||
<li><span class="parameter">n</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
the number of expected elements in the list, including nil values
|
||||
(<em>default</em> #t)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
result
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h3 class="doc-title"><a name = "dict"></a>Dictionary operations</h3>
|
||||
<div class="doc-description">
|
||||
|
||||
|
||||
</div>
|
||||
<dl class="function">
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "invert"></a>
|
||||
<strong>invert (t)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns a new table where the keys and values have been inverted.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">t</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
the table
|
||||
</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>
|
||||
the inverted table
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "copy"></a>
|
||||
<strong>copy (t)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Perform a deep copy of a table.
|
||||
The copied table will keep the share the same metatable as the original table.
|
||||
If a key is a table, it will be reused and not copied.
|
||||
Note this uses pairs() to perform the copy, which will honor the __pairs methamethod if present.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">t</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
the table
|
||||
</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>
|
||||
the copied table
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "requirer"></a>
|
||||
<strong>requirer ([prefix=""])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns a table which, when indexed, will require() the module with the index as a name (and a optional prefix).
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">prefix</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
|
||||
that will prefix modules names when calling require()
|
||||
(<em>default</em> "")
|
||||
</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>
|
||||
the requirer table
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h3 class="doc-title"><a name = "random"></a>Random and UUID</h3>
|
||||
<div class="doc-description">
|
||||
|
||||
|
||||
</div>
|
||||
<dl class="function">
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "uuid4"></a>
|
||||
<strong>uuid4 ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Generate a UUID v4.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
<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>
|
||||
the UUID in its canonical representation
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h3 class="doc-title"><a name = "grouping"></a>Object grouping</h3>
|
||||
<div class="doc-description">
|
||||
|
||||
|
||||
</div>
|
||||
<dl class="function">
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "group"></a>
|
||||
<strong>group (list[, n=#t[, p=nil]])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Groups objects in a meta-object-proxy-thingy.
|
||||
Works great with Lua 5.2+. LuaJit requires to be built with Lua 5.2 compatibility enabled to support group comparaison.
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">list</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
of objects
|
||||
</li>
|
||||
<li><span class="parameter">n</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
the number of expected elements in the list, including nil values
|
||||
(<em>default</em> #t)
|
||||
</li>
|
||||
<li><span class="parameter">p</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
||||
list of parents. Used to find the first arguments of method calls.
|
||||
(<em>default</em> nil)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">Group</span></span>
|
||||
object
|
||||
</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-12-25 20:46:24 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -41,9 +41,13 @@
|
|||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/ubiquitousse.html">ubiquitousse</a></li>
|
||||
<li><a href="../modules/ldtk.html">ldtk</a></li>
|
||||
<li><a href="../modules/ecs.html">ecs</a></li>
|
||||
<li><a href="../modules/asset.html">asset</a></li>
|
||||
<li><a href="../modules/ecs.html">ecs</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>
|
||||
<li><a href="../modules/timer.html">timer</a></li>
|
||||
<li><a href="../modules/util.html">util</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
|
@ -60,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-25 19:17:08 </i>
|
||||
<i style="float:right;">Last updated 2021-12-25 20:46:24 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -41,9 +41,13 @@
|
|||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/ubiquitousse.html">ubiquitousse</a></li>
|
||||
<li><a href="../modules/ldtk.html">ldtk</a></li>
|
||||
<li><a href="../modules/ecs.html">ecs</a></li>
|
||||
<li><a href="../modules/asset.html">asset</a></li>
|
||||
<li><a href="../modules/ecs.html">ecs</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>
|
||||
<li><a href="../modules/timer.html">timer</a></li>
|
||||
<li><a href="../modules/util.html">util</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
|
@ -65,7 +69,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-25 19:17:08 </i>
|
||||
<i style="float:right;">Last updated 2021-12-25 20:46:24 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue