|
75 | 75 | of an entity, it must exist in Ash. Throws exception if compulsory is true and entity name |
76 | 76 | 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><<span class="type">String</span>></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><<span class="type">T</span>>(?nodeClass:<span class="type">Class</span><<span class="type">T</span>> = null):<span class="type">Array</span><<span class="type">Entity</span>></code></p></h3><div class="doc"><p>Returns an array of all entities that match the node. |
77 | 77 | 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<TNode></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 |
79 | 80 | 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 |
80 | 81 | coordinates being pointed at by the mouse, or null if the mouse position |
81 | 82 | 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><<span class="type">T</span>>(ref:<a class="type" href="../flaxen/EntityRef.html">EntityRef</a>, component:<span class="type">Class</span><<span class="type">T</span>>):<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 | 89 | of the clickpoint and image dimensions, respective to the position. Returns |
89 | 90 | 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 |
90 | 91 | 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 |
93 | 93 | An entity is pressed if the mouse is being clicked, the cursor is within |
94 | 94 | 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>. |
95 | 95 | 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