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
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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue