Skip to content

Commit cffaa82

Browse files
committed
Updated Flaxen API
1 parent f3d04cd commit cffaa82

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flaxen/dox/flaxen/Flaxen.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@
7575
of an entity, it must exist in Ash. Throws exception if compulsory is true and entity name
7676
lookup fails or component not be found</p><table class="table table-condensed"><tbody><col width="10%"/> <col width="100%"/><tr><td>ref</td><td><p>An entity object, or the string name of such an object</p></td></tr><tr><td>compulsory</td><td><p>Determines if an exception is thrown (true) or null is returned (false) upon any failure</p></td></tr><tr><td>returns</td><td><p>The component requested, or null if the component could not be found</p></td></tr></tbody></table></div></div><div class="platform platform-dox"><a name="getComponentSet"></a><h3><p><code><span class="keyword">function</span> <a href="#getComponentSet"><span class="identifier">getComponentSet</span></a>(name:<span class="type">String</span>):<a class="type" href="../flaxen/ComponentSet.html">ComponentSet</a></code></p></h3><div class="doc"><p>Returns a component set. Throws an exception if the set cannot be found.</p><table class="table table-condensed"><tbody><col width="10%"/> <col width="100%"/><tr><td>setName</td><td><p>The name of a <code><a href="../flaxen/ComponentSet.html">ComponentSet</a></code>, previously defined by <code>newComponentSet</code>. </p></td></tr><tr><td>returns</td><td><p>The component set found</p></td></tr></tbody></table></div></div><div class="platform platform-dox"><a name="getComponentSetKeys"></a><h3><p><code><span class="keyword">function</span> <a href="#getComponentSetKeys"><span class="identifier">getComponentSetKeys</span></a>():<span class="type">Iterator</span>&lt;<span class="type">String</span>&gt;</code></p></h3><div class="doc"><p>Iterates over the component set names. For debugging.</p><table class="table table-condensed"><tbody><col width="10%"/> <col width="100%"/><tr><td>returns</td><td><p>A String iterator of component set names.</p></td></tr></tbody></table></div></div><div class="platform platform-dox"><a name="getEntities"></a><h3><p><code><span class="keyword">function</span> <a href="#getEntities"><span class="identifier">getEntities</span></a>&lt;<span class="type">T</span>&gt;(?nodeClass:<span class="type">Class</span>&lt;<span class="type">T</span>&gt; = null):<span class="type">Array</span>&lt;<span class="type">Entity</span>&gt;</code></p></h3><div class="doc"><p>Returns an array of all entities that match the node.
7777
If no node is provided, returns the full ash entity list.</p><table class="table table-condensed"><tbody><col width="10%"/> <col width="100%"/><tr><td>nodeClass</td><td><p>A class that extends Node<T>, see <code>ash.core.Node&lt;TNode&gt;</code>, or null</p></td></tr><tr><td>returns</td><td><p>An array of all entities matched by the node</p></td></tr></tbody></table></div></div><div class="platform platform-dox"><a name="getEntity"></a><h3><p><code><span class="keyword">function</span> <a href="#getEntity"><span class="identifier">getEntity</span></a>(name:<span class="type">String</span>, ?compulsory:<span class="type">Bool</span> = true):<span class="type">Entity</span></code></p></h3><div class="doc"><p>Looks up an entity by name, and returns it. If the name could looked up,
78-
throws an exception if compulsory, otherwise returns null.</p><table class="table table-condensed"><tbody><col width="10%"/> <col width="100%"/><tr><td>ref</td><td><p>The string name of an entity object to look up</p></td></tr><tr><td>returns</td><td><p>The entity asked for, f the named entity exists in Ash, otherwise null</p></td></tr></tbody></table></div></div><div class="platform platform-dox"><a name="getGlobalAudio"></a><h3><p><code><span class="keyword">function</span> <a href="#getGlobalAudio"><span class="identifier">getGlobalAudio</span></a>():<a class="type" href="../flaxen/component/GlobalAudio.html">GlobalAudio</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-dox"><a name="getLayout"></a><h3><p><code><span class="keyword">function</span> <a href="#getLayout"><span class="identifier">getLayout</span></a>(name:<span class="type">String</span>):<a class="type" href="../flaxen/component/Layout.html">Layout</a></code></p></h3><div class="doc"><p>Returns the <code><a href="../flaxen/component/Layout.html">Layout</a></code> defined by the supplied name, or throws an exception if it
78+
throws an exception if compulsory, otherwise returns null.</p><table class="table table-condensed"><tbody><col width="10%"/> <col width="100%"/><tr><td>ref</td><td><p>The string name of an entity object to look up</p></td></tr><tr><td>returns</td><td><p>The entity asked for, f the named entity exists in Ash, otherwise null</p></td></tr></tbody></table></div></div><div class="platform platform-dox"><a name="getGlobalAudio"></a><h3><p><code><span class="keyword">function</span> <a href="#getGlobalAudio"><span class="identifier">getGlobalAudio</span></a>():<a class="type" href="../flaxen/component/GlobalAudio.html">GlobalAudio</a></code></p></h3><div class="doc"><p>Returns the global audio object. Creates the object if it does not yet exist.
79+
Use it to set global volume, mute, or stop audio after a cutoff.</p><table class="table table-condensed"><tbody><col width="10%"/> <col width="100%"/><tr><td>returns</td><td><p>The <code><a href="../flaxen/component/GlobalAudio.html">GlobalAudio</a></code> object</p></td></tr></tbody></table></div></div><div class="platform platform-dox"><a name="getLayout"></a><h3><p><code><span class="keyword">function</span> <a href="#getLayout"><span class="identifier">getLayout</span></a>(name:<span class="type">String</span>):<a class="type" href="../flaxen/component/Layout.html">Layout</a></code></p></h3><div class="doc"><p>Returns the <code><a href="../flaxen/component/Layout.html">Layout</a></code> defined by the supplied name, or throws an exception if it
7980
could not be found.</p><table class="table table-condensed"><tbody><col width="10%"/> <col width="100%"/><tr><td>name</td><td><p>The name of the <code><a href="../flaxen/component/Layout.html">Layout</a></code></p></td></tr><tr><td>returns</td><td><p>The matching Layout object</p></td></tr></tbody></table></div></div><div class="platform platform-dox"><a name="getMouseCell"></a><h3><p><code><span class="keyword">function</span> <a href="#getMouseCell"><span class="identifier">getMouseCell</span></a>(ref:<a class="type" href="../flaxen/EntityRef.html">EntityRef</a>, rows:<span class="type">Int</span>, cols:<span class="type">Int</span>):{y:<span class="type">Int</span>, x:<span class="type">Int</span>}</code></p></h3><div class="doc"><p>Given an entity with an image that represents a grid, returns the cell
8081
coordinates being pointed at by the mouse, or null if the mouse position
8182
lies outside of the image.</p><table class="table table-condensed"><tbody><col width="10%"/> <col width="100%"/><tr><td>ref</td><td><p>An entity object, or the string name of such an object</p></td></tr><tr><td>rows</td><td><p>The number of rows in the grid</p></td></tr><tr><td>cols</td><td><p>The number of columns in the grid</p></td></tr><tr><td>returns</td><td><p>An anonymous object {x,y} indicating the cell pointed at, or null if the entity is not pointed at</p></td></tr></tbody></table></div></div><div class="platform platform-dox"><a name="hasComponent"></a><h3><p><code><span class="keyword">function</span> <a href="#hasComponent"><span class="identifier">hasComponent</span></a>&lt;<span class="type">T</span>&gt;(ref:<a class="type" href="../flaxen/EntityRef.html">EntityRef</a>, component:<span class="type">Class</span>&lt;<span class="type">T</span>&gt;):<span class="type">Bool</span></code></p></h3><div class="doc"><p>Returns true if the entity exists and has the indicated component. If you supply
@@ -88,8 +89,7 @@
8889
of the clickpoint and image dimensions, respective to the position. Returns
8990
null if the position does not fall within the entity.</p><table class="table table-condensed"><tbody><col width="10%"/> <col width="100%"/><tr><td>ref</td><td><p>An entity object, or the string name of such an object</p></td></tr><tr><td>x</td><td><p>An absolute x position; in screen-space</p></td></tr><tr><td>y</td><td><p>An absolute y position; in screen-space</p></td></tr><tr><td>returns</td><td><p>An anonymous object {xOffset,yOffset,width,height} indicating the
9091
relative position and the entity dimensions;
91-
or null if x,y does not intersect with the object</p></td></tr></tbody></table></div></div><div class="platform platform-dox"><a name="init"></a><h3><p><code><span class="keyword">function</span> <a href="#init"><span class="identifier">init</span></a>():<span class="type">Void</span></code></p></h3><div class="doc"><p>Initialization function called by HaxePunk. This is called after
92-
HaxePunk has completed initializing itself.</p></div></div><div class="platform platform-dox"><a name="isPressed"></a><h3><p><code><span class="keyword">function</span> <a href="#isPressed"><span class="identifier">isPressed</span></a>(ref:<a class="type" href="../flaxen/EntityRef.html">EntityRef</a>, ?minAlpha:<span class="type">Float</span> = 1.0f):<span class="type">Bool</span></code></p></h3><div class="doc"><p>Rough button (or any item) click checker; does not handle layering or entity ordering
92+
or null if x,y does not intersect with the object</p></td></tr></tbody></table></div></div><div class="platform platform-dox"><a name="isPressed"></a><h3><p><code><span class="keyword">function</span> <a href="#isPressed"><span class="identifier">isPressed</span></a>(ref:<a class="type" href="../flaxen/EntityRef.html">EntityRef</a>, ?minAlpha:<span class="type">Float</span> = 1.0f):<span class="type">Bool</span></code></p></h3><div class="doc"><p>Rough button (or any item) click checker; does not handle layering or entity ordering
9393
An entity is pressed if the mouse is being clicked, the cursor is within
9494
the rectangular dimensions of the entity, and the entity has full alpha (or as specified).</p><table class="table table-condensed"><tbody><col width="10%"/> <col width="100%"/><tr><td>ref</td><td><p>An entity object, or the string name of such an object</p></td></tr><tr><td>minAlpha</td><td><p>Ignores clicks if the Alpha of the entity is below this minimum; defaults to full alpha (off)</p></td></tr><tr><td>returns</td><td><p>True if the entity is being clicked on</p></td></tr></tbody></table></div></div><div class="platform platform-dox"><a name="newActionQueue"></a><h3><p><code><span class="keyword">function</span> <a href="#newActionQueue"><span class="identifier">newActionQueue</span></a>(?autoStart:<span class="type">Bool</span> = true, ?name:<span class="type">String</span> = null):<a class="type" href="../flaxen/component/ActionQueue.html">ActionQueue</a></code></p></h3><div class="doc"><p>Creates a new ActionQueue puts it into a new Entity. See <code><a href="../flaxen/component/ActionQueue.html">ActionQueue</a></code>.
9595
This entity will be destroyed when the queue completes.</p><table class="table table-condensed"><tbody><col width="10%"/> <col width="100%"/><tr><td>autoStart</td><td><p>If true (default), the queue will run immediately</p></td></tr><tr><td>name</td><td><p>An optional name or pattern; see <code>newEntity</code> for naming</p></td></tr><tr><td>returns</td><td><p>An ActionQueue instance; you can find the enclosing entity with <code>getEntity(aq.name)</code></p></td></tr></tbody></table></div></div><div class="platform platform-dox"><a name="newChildEntity"></a><h3><p><code><span class="keyword">function</span> <a href="#newChildEntity"><span class="identifier">newChildEntity</span></a>(parentRef:<a class="type" href="../flaxen/EntityRef.html">EntityRef</a>, childName:<span class="type">String</span>):<span class="type">Entity</span></code></p></h3><div class="doc"><p>Creates a child entity and makes it dependent on the parent entity

0 commit comments

Comments
 (0)