Skip to content

Commit a16be3c

Browse files
committed
Updated Flaxen API
1 parent e1f8c44 commit a16be3c

File tree

194 files changed

+350
-329
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+350
-329
lines changed

flaxen/dox/flaxen/ComponentSet.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en"><head><meta charset="utf-8"/><link href="../bootstrap-combined.min.css" rel="stylesheet" /><script type="text/javascript" src="../jquery-1.9.1.min.js"></script><script type="text/javascript" src="../bootstrap.min.js"></script><link href="../styles.css" rel="stylesheet" /><link rel="icon" href="../favicon.ico" type="image/x-icon"></link><script type="text/javascript" src="../nav.js"></script><script type="text/javascript" src="../index.js"></script><script type="text/javascript">var dox = {rootPath: "../",platforms: ["dox"]};</script><title>ComponentSet - Flaxen API 13-May-15</title></head><body><div class="navbar navbar-inverse navbar-fixed-top"><div class="navbar-inner"><form class="navbar-search pull-left" id="searchForm"><input id="search" type="text" class="search-query" placeholder="Filter" autocomplete="off"/></form><ul class="nav"><li id="select-platform" class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Platform<b class="caret"></b></a><ul class="dropdown-menu"><li data="all"><a href="#">All Platforms</a></li><li data="dox"><a href="#">dox</a></li></ul></li></ul></div></div><div id="container"><div id="nav"></div><div id="content"><div class="header"><span class="viewsource"><a href="https://github.com/scriptorum/flaxen/blob/master/source/flaxen/ComponentSet.hx">View source</a></span><h1><code><span class="directive">class </span><span class="type">flaxen.ComponentSet</span></code></h1></div><div class="body"><p class="availability">Available on all platforms</p><div class="doc"><p>A ComponentSet is a list of steps that can be added (installed) into an entity
2+
<html lang="en"><head><meta charset="utf-8"/><link href="../bootstrap-combined.min.css" rel="stylesheet" /><script type="text/javascript" src="../jquery-1.9.1.min.js"></script><script type="text/javascript" src="../bootstrap.min.js"></script><link href="../styles.css" rel="stylesheet" /><link rel="icon" href="../favicon.ico" type="image/x-icon"></link><script type="text/javascript" src="../nav.js"></script><script type="text/javascript" src="../index.js"></script><script type="text/javascript">var dox = {rootPath: "../",platforms: ["dox"]};</script><title>ComponentSet - Flaxen API 16-Aug-15</title></head><body><div class="navbar navbar-inverse navbar-fixed-top"><div class="navbar-inner"><form class="navbar-search pull-left" id="searchForm"><input id="search" type="text" class="search-query" placeholder="Filter" autocomplete="off"/></form><ul class="nav"><li id="select-platform" class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Platform<b class="caret"></b></a><ul class="dropdown-menu"><li data="all"><a href="#">All Platforms</a></li><li data="dox"><a href="#">dox</a></li></ul></li></ul></div></div><div id="container"><div id="nav"></div><div id="content"><div class="header"><span class="viewsource"><a href="https://github.com/scriptorum/flaxen/blob/master/source/flaxen/ComponentSet.hx">View source</a></span><h1><code><span class="directive">class </span><span class="type">flaxen.ComponentSet</span></code></h1></div><div class="body"><p class="availability">Available on all platforms</p><div class="doc"><p>A ComponentSet is a list of steps that can be added (installed) into an entity
33
(or ideally more). Most steps are for adding instances of components. This is its
44
primary function, to quickly add components to an entity. Steps can also be used
55
to remove components from entities, or execute arbitrary functions that may or may
@@ -12,9 +12,9 @@
1212
.addClass(Position, [0, 0])
1313
.remove(Animation);
1414
flaxen.addSet(entity1, "base");
15-
flaxen.addSet(entity2, "base");</code></pre></div><h2>Instance Fields</h2><div class="platform platform-dox"><a name="new"></a><h3><p><code><span class="keyword">function</span> <a href="#new"><span class="identifier">new</span></a>():<span class="type">Void</span></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-dox"><a name="add"></a><h3><p><code><span class="keyword">function</span> <a href="#add"><span class="identifier">add</span></a>&lt;<span class="type">T</span>&gt;(component:<span class="type">T</span>):<a class="type" href="../flaxen/ComponentSet.html">ComponentSet</a></code></p></h3><div class="doc"><p>Adds a component instance to the component set. Note that all entities using this set
15+
flaxen.addSet(entity2, "base");</code></pre></div><h2>Instance Fields</h2><div class="platform platform-dox"><a name="new"></a><h3><p><code><span class="keyword">function</span> <a href="#new"><span class="identifier">new</span></a>():<span class="type">Void</span></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-dox"><a name="add"></a><h3><p><code><span class="keyword">function</span> <a href="#add"><span class="identifier">add</span></a>(component:<span class="type">Dynamic</span>):<a class="type" href="../flaxen/ComponentSet.html">ComponentSet</a></code></p></h3><div class="doc"><p>Adds a component instance to the component set. Note that all entities using this set
1616
will be sharing the same single instance of this component. See addClass.
17-
TODO Verify this is not a Class or Function being passed in.</p></div></div><div class="platform platform-dox"><a name="addClass"></a><h3><p><code><span class="keyword">function</span> <a href="#addClass"><span class="identifier">addClass</span></a>(clazz:<span class="type">Class</span>&lt;<span class="type">Dynamic</span>&gt;, ?args:<span class="type">Array</span>&lt;<span class="type">Dynamic</span>&gt; = null):<a class="type" href="../flaxen/ComponentSet.html">ComponentSet</a></code></p></h3><div class="doc"><p>Adds a class and parameters to the set. The class will be instantiated with the
17+
TODO Verify this is not a Class or Function being passed in.</p></div></div><div class="platform platform-dox"><a name="addClass"></a><h3><p><code><span class="keyword">function</span> <a href="#addClass"><span class="identifier">addClass</span></a>(clazz:<span class="type">Class</span>&lt;<span class="type">Dynamic</span>&gt;, ?args:<span class="type">Array</span>&lt;<span class="type">Dynamic</span>&gt;):<a class="type" href="../flaxen/ComponentSet.html">ComponentSet</a></code></p></h3><div class="doc"><p>Adds a class and parameters to the set. The class will be instantiated with the
1818
supplied paramters every time the set is installed in an entity. This prevents
1919
sharing of instances that happens when you call set.add(new MyComponent(A, B, C)).
2020
For example: set.addClass(MyComponent, [A, B, C]);</p></div></div><div class="platform platform-dox"><a name="addEntity"></a><h3><p><code><span class="keyword">function</span> <a href="#addEntity"><span class="identifier">addEntity</span></a>(entity:<span class="type">Entity</span>):<a class="type" href="../flaxen/ComponentSet.html">ComponentSet</a></code></p></h3><div class="doc"><p>Adds all the components from one entity into the set. Note that these components
@@ -30,7 +30,7 @@
3030
entity, or instead add the WeaponSet to the GunSet using this method. Then when
3131
install GunSet, the entity will also get WeaponSet installed.</p></div></div><div class="platform platform-dox"><a name="install"></a><h3><p><code><span class="keyword">function</span> <a href="#install"><span class="identifier">install</span></a>(entity:<span class="type">Entity</span>):<span class="type">Void</span></code></p></h3><div class="doc"><p>Installs the components into the entity</p></div></div><div class="platform platform-dox"><a name="remove"></a><h3><p><code><span class="keyword">function</span> <a href="#remove"><span class="identifier">remove</span></a>(clazz:<span class="type">Class</span>&lt;<span class="type">Dynamic</span>&gt;):<a class="type" href="../flaxen/ComponentSet.html">ComponentSet</a></code></p></h3><div class="doc"><p>\*
3232
Does not add an instance. Instead, when installed, removes the supplied
33-
component from the entity, if it has one.</p></div></div><div class="platform platform-dox"><a name="removeAll"></a><h3><p><code><span class="keyword">function</span> <a href="#removeAll"><span class="identifier">removeAll</span></a>(?except:<span class="type">Array</span>&lt;<span class="type">Class</span>&lt;<span class="type">Dynamic</span>&gt;&gt; = null):<a class="type" href="../flaxen/ComponentSet.html">ComponentSet</a></code></p></h3><div class="doc"><p>Does not add an instance. Instead, when installed, removes all components
33+
component from the entity, if it has one.</p></div></div><div class="platform platform-dox"><a name="removeAll"></a><h3><p><code><span class="keyword">function</span> <a href="#removeAll"><span class="identifier">removeAll</span></a>(?except:<span class="type">Array</span>&lt;<span class="type">Class</span>&lt;<span class="type">Dynamic</span>&gt;&gt;):<a class="type" href="../flaxen/ComponentSet.html">ComponentSet</a></code></p></h3><div class="doc"><p>Does not add an instance. Instead, when installed, removes all components
3434
from an entity. Completely blanks out an entity. Do this before any add calls.
3535
If an array of component classes is supplied, these components will be
3636
spared removal</p></div></div><div class="platform platform-dox"><a name="toString"></a><h3><p><code><span class="keyword">function</span> <a href="#toString"><span class="identifier">toString</span></a>():<span class="type">String</span></code></p></h3><div class="doc"><p>TODO This reports "[func]" if it encounters a remove or removeAll. This

flaxen/dox/flaxen/EntityRef.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en"><head><meta charset="utf-8"/><link href="../bootstrap-combined.min.css" rel="stylesheet" /><script type="text/javascript" src="../jquery-1.9.1.min.js"></script><script type="text/javascript" src="../bootstrap.min.js"></script><link href="../styles.css" rel="stylesheet" /><link rel="icon" href="../favicon.ico" type="image/x-icon"></link><script type="text/javascript" src="../nav.js"></script><script type="text/javascript" src="../index.js"></script><script type="text/javascript">var dox = {rootPath: "../",platforms: ["dox"]};</script><title>EntityRef - Flaxen API 13-May-15</title></head><body><div class="navbar navbar-inverse navbar-fixed-top"><div class="navbar-inner"><form class="navbar-search pull-left" id="searchForm"><input id="search" type="text" class="search-query" placeholder="Filter" autocomplete="off"/></form><ul class="nav"><li id="select-platform" class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Platform<b class="caret"></b></a><ul class="dropdown-menu"><li data="all"><a href="#">All Platforms</a></li><li data="dox"><a href="#">dox</a></li></ul></li></ul></div></div><div id="container"><div id="nav"></div><div id="content"><div class="header"><span class="viewsource"><a href="https://github.com/scriptorum/flaxen/blob/master/source/flaxen/Flaxen.hx">View source</a></span><h1><code><span class="directive">abstract </span><span class="type">flaxen.EntityRef</span>(<span class="type">Either</span>&lt;<span class="type">Entity</span>, <span class="type">String</span>&gt;)</code></h1></div><div class="body"><p><code class="dark"><span class="directive">import</span> <span class="type">flaxen.Flaxen</span>;</code></p><p class="availability">Available on all platforms</p><div class="doc"><p>In many methods where an Entity is expected you can instead pass a String
2+
<html lang="en"><head><meta charset="utf-8"/><link href="../bootstrap-combined.min.css" rel="stylesheet" /><script type="text/javascript" src="../jquery-1.9.1.min.js"></script><script type="text/javascript" src="../bootstrap.min.js"></script><link href="../styles.css" rel="stylesheet" /><link rel="icon" href="../favicon.ico" type="image/x-icon"></link><script type="text/javascript" src="../nav.js"></script><script type="text/javascript" src="../index.js"></script><script type="text/javascript">var dox = {rootPath: "../",platforms: ["dox"]};</script><title>EntityRef - Flaxen API 16-Aug-15</title></head><body><div class="navbar navbar-inverse navbar-fixed-top"><div class="navbar-inner"><form class="navbar-search pull-left" id="searchForm"><input id="search" type="text" class="search-query" placeholder="Filter" autocomplete="off"/></form><ul class="nav"><li id="select-platform" class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Platform<b class="caret"></b></a><ul class="dropdown-menu"><li data="all"><a href="#">All Platforms</a></li><li data="dox"><a href="#">dox</a></li></ul></li></ul></div></div><div id="container"><div id="nav"></div><div id="content"><div class="header"><span class="viewsource"><a href="https://github.com/scriptorum/flaxen/blob/master/source/flaxen/Flaxen.hx">View source</a></span><h1><code><span class="directive">abstract </span><span class="type">flaxen.EntityRef</span>(<span class="type">Either</span>&lt;<span class="type">Entity</span>, <span class="type">String</span>&gt;)</code></h1></div><div class="body"><p><code class="dark"><span class="directive">import</span> <span class="type">flaxen.Flaxen</span>;</code></p><p class="availability">Available on all platforms</p><div class="doc"><p>In many methods where an Entity is expected you can instead pass a String
33
that is the name of an Entity in Ash. EntityRef is an abstract type that
44
could be referring to either an Entity or a String. A class may use
55
ref.toEntity() to validate the reference and return a full Entity instance.</p></div><h2>Class Fields</h2><div class="platform platform-dox"><a name="fromEntity"></a><h3><p><code><span class="keyword">function</span> <a href="#fromEntity"><span class="identifier">fromEntity</span></a>(e:<span class="type">Entity</span>):<a class="type" href="../flaxen/EntityRef.html">EntityRef</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-dox"><a name="fromString"></a><h3><p><code><span class="keyword">function</span> <a href="#fromString"><span class="identifier">fromString</span></a>(str:<span class="type">String</span>):<a class="type" href="../flaxen/EntityRef.html">EntityRef</a></code></p></h3><div class="doc"><p></p></div></div><h2>Instance Fields</h2><div class="platform platform-dox"><a name="type"></a><h3><p><code><span class="keyword">var</span> <a href="#type"><span class="identifier">type</span></a>:<span class="type">Either</span>&lt;<span class="type">Entity</span>, <span class="type">String</span>&gt;</code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-dox"><a name="get_type"></a><h3><p><code><span class="keyword">function</span> <a href="#get_type"><span class="identifier">get_type</span></a>():<span class="type">Either</span>&lt;<span class="type">Entity</span>, <span class="type">String</span>&gt;</code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-dox"><a name="toEntity"></a><h3><p><code><span class="keyword">function</span> <a href="#toEntity"><span class="identifier">toEntity</span></a>(f:<a class="type" href="../flaxen/Flaxen.html">Flaxen</a>, ?compulsory:<span class="type">Bool</span> = true):<span class="type">Entity</span></code></p></h3><div class="doc"><p>Converts the EntityRef into an Entity. If the EntityRef references

0 commit comments

Comments
 (0)