docs/file.README.html in felflame-2.0.0 vs docs/file.README.html in felflame-3.0.0
- old
+ new
@@ -193,27 +193,27 @@
<h3 id="creation">Creation</h3>
<p>Entities are essentially "objects" in the game world. To create a new Entity we do the following:</p>
-<pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span> <span class='op'>=</span> <span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Entities</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Entities.html" title="FelFlame::Entities (class)">Entities</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FelFlame/Entities.html#initialize-instance_method" title="FelFlame::Entities#initialize (method)">new</a></span></span>
</code></pre>
<p>or if we want to add (any number of)components to it:</p>
-<pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span> <span class='op'>=</span> <span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Entites</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
- <span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Components</span><span class='op'>::</span><span class='const'>Health</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span>
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'>Entites</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
+ <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (class)">Components</a></span></span><span class='op'>::</span><span class='const'>Health</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span>
<span class='ivar'>@component</span><span class='comma'>,</span>
- <span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Components</span><span class='op'>::</span><span class='const'>Armour</span><span class='lbracket'>[</span><span class='int'>7</span><span class='rbracket'>]</span>
+ <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (class)">Components</a></span></span><span class='op'>::</span><span class='const'>Armour</span><span class='lbracket'>[</span><span class='int'>7</span><span class='rbracket'>]</span>
<span class='rparen'>)</span>
</code></pre>
<h3 id="accessing">Accessing</h3>
<p>Once components are created we can access them using their ID like so:</p>
-<pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span> <span class='op'>=</span> <span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Entities</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span>
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Entities.html" title="FelFlame::Entities (class)">Entities</a></span></span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span>
</code></pre>
<h3 id="get-id">Get ID</h3>
<p>Entity ID's are generated starting from 0 and ascending, unless if there is a missing ID because of a deleted
@@ -249,11 +249,11 @@
<h3 id="creating-a-component-manager">Creating a Component Manager</h3>
<p>Components are where all the data is stored. The data is stored in variables or accessors in each component.
These accessors and their defaults are configured when a component manager is created, like so:</p>
-<pre class="code ruby"><code class="ruby"><span class='ivar'>@component_manager</span> <span class='op'>=</span> <span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Components</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Stats</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:armour</span><span class='comma'>,</span> <span class='label'>hp:</span> <span class='int'>100</span><span class='rparen'>)</span>
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@component_manager</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (class)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FelFlame/Components.html#new-class_method" title="FelFlame::Components.new (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Stats</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:armour</span><span class='comma'>,</span> <span class='label'>hp:</span> <span class='int'>100</span><span class='rparen'>)</span>
</code></pre>
<p>In this example we created a component manager called "Stats".
The name given to component managers must follow the same rules for naming constants in ruby for a reason you will shortly see.
The parameters following are all creating the attributes we can set.
@@ -263,25 +263,25 @@
<h3 id="creating-a-component-from-a-component-manager">Creating a Component from a Component Manager</h3>
<p>Now that we have a component manager we can make components from it like so:</p>
-<pre class="code ruby"><code class="ruby"><span class='ivar'>@component</span> <span class='op'>=</span> <span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Components</span><span class='op'>::</span><span class='const'>Stats</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@component</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (class)">Components</a></span></span><span class='op'>::</span><span class='const'>Stats</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
</code></pre>
<p>Or we can even change the defaults:</p>
-<pre class="code ruby"><code class="ruby"><span class='ivar'>@component</span> <span class='op'>=</span> <span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Components</span><span class='op'>::</span><span class='const'>Stats</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>armour:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>steel</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@component</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (class)">Components</a></span></span><span class='op'>::</span><span class='const'>Stats</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>armour:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>steel</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
</code></pre>
<h3 id="accessing-and-getting-id">Accessing and Getting ID</h3>
<p>Just like Entities, Components have IDs.
These IDs are only unique within the scope of their respective Component Managers.
Here is how we can get the ID, as well as how to access a Component from its Component Manager.</p>
-<pre class="code ruby"><code class="ruby"><span class='ivar'>@component</span> <span class='op'>=</span> <span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Components</span><span class='op'>::</span><span class='const'>Stats</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span>
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@component</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (class)">Components</a></span></span><span class='op'>::</span><span class='const'>Stats</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span>
<span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span> <span class='comment'># => 2
</span></code></pre>
<h3 id="accessing-attributes-and-changing-them">Accessing Attributes and Changing Them</h3>
@@ -305,11 +305,11 @@
<h3 id="iterating-over-components">Iterating over Components</h3>
<p>When you make Systems you will want to be able to iterate over all Components of the same Component Manager(for example iterating over all sprites to render them). Here is how we do that:</p>
-<pre class="code ruby"><code class="ruby"><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Components</span><span class='op'>::</span><span class='const'>Sprites</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_component'>component</span><span class='op'>|</span>
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (class)">Components</a></span></span><span class='op'>::</span><span class='const'>Sprites</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_component'>component</span><span class='op'>|</span>
<span class='comment'>#do something with components
</span><span class='kw'>end</span>
</code></pre>
<h3 id="accessing-components-attached-entities">Accessing Components' attached Entities</h3>
@@ -323,142 +323,142 @@
<h3 id="creation">Creation</h3>
<p>We can create Systems like so:</p>
-<pre class="code ruby"><code class="ruby"><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Render</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>priority:</span> <span class='int'>2</span><span class='rparen'>)</span> <span class='kw'>do</span>
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FelFlame/Systems.html#initialize-instance_method" title="FelFlame::Systems#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Render</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>priority:</span> <span class='int'>2</span><span class='rparen'>)</span> <span class='kw'>do</span>
<span class='comment'># Code and Logic
</span><span class='kw'>end</span>
</code></pre>
<p>The name we assign is how we can access the System, like so:</p>
-<pre class="code ruby"><code class="ruby"><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>Render</span>
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>Render</span>
</code></pre>
<p>Priority determines the order Systems should be executed, this is used for <code>Scenes</code> and the <code>Stage</code>.
The lower the number, the earlier a given System will be executed.
E.g priority 1 will go first, priority 2 will go second, etcetera. </p>
<p>Often we will want to execute some logic on each Component in a given Component Manager so our code might look like this:</p>
-<pre class="code ruby"><code class="ruby"><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Render</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>priority:</span> <span class='int'>2</span><span class='rparen'>)</span> <span class='kw'>do</span>
- <span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Components</span><span class='op'>::</span><span class='const'>Sprites</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_component'>component</span><span class='op'>|</span>
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FelFlame/Systems.html#initialize-instance_method" title="FelFlame::Systems#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Render</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>priority:</span> <span class='int'>2</span><span class='rparen'>)</span> <span class='kw'>do</span>
+ <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (class)">Components</a></span></span><span class='op'>::</span><span class='const'>Sprites</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_component'>component</span><span class='op'>|</span>
<span class='comment'># do something with these components
</span> <span class='kw'>end</span>
<span class='kw'>end</span>
</code></pre>
<h3 id="execution">Execution</h3>
<p>After we create a System, it won't do anything on its own until we tell it to. Here is how:</p>
-<pre class="code ruby"><code class="ruby"><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>Render</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>Render</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
</code></pre>
<p>Sometimes you might want to manually activate a System, but the more common way to have Systems be triggered is to use Scenes and the Stage or the alternative ways of execution.</p>
<h3 id="alternative-execution">Alternative Execution</h3>
<p>Sometimes you want a System to automatically trigger when a special even happens. FelFlame can keep track of when a Component is added, removed, or when an attribute is changed and then execute Systems linked to these events. Here is how to create these links:</p>
<pre class="code ruby"><code class="ruby"><span class='comment'># When this Component is added to an Entity, this System will be called
-</span><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_added'>trigger_when_added</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='rparen'>)</span>
+</span><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_added'>trigger_when_added</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='rparen'>)</span>
<span class='comment'># When this Component is removed from an Entity, this System will be called
-</span><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_removed'>trigger_when_removed</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='rparen'>)</span>
+</span><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_removed'>trigger_when_removed</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='rparen'>)</span>
<span class='comment'># When this Component's health attribute is changed, this System will be called
-</span><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_is_set'>trigger_when_is_set</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='comma'>,</span> <span class='symbol'>:health</span><span class='rparen'>)</span>
+</span><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_is_set'>trigger_when_is_set</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='comma'>,</span> <span class='symbol'>:health</span><span class='rparen'>)</span>
</code></pre>
<p>If we want these triggers to happen for all Components that belong to specific Component Manager then we can do that instead:</p>
<pre class="code ruby"><code class="ruby"><span class='comment'># When a Component from this Component Manager is added to an Entity, this System will be called
-</span><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_added'>trigger_when_added</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='rparen'>)</span>
+</span><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_added'>trigger_when_added</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='rparen'>)</span>
<span class='comment'># When a Component from this Component Manager is removed from an Entity, this System will be called
-</span><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_removed'>trigger_when_removed</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='rparen'>)</span>
+</span><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_removed'>trigger_when_removed</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='rparen'>)</span>
<span class='comment'># When this Component's health attribute from this Component Manager is changed, this System will be called
-</span><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_is_set'>trigger_when_is_set</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='comma'>,</span> <span class='symbol'>:health</span><span class='rparen'>)</span>
+</span><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_is_set'>trigger_when_is_set</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='comma'>,</span> <span class='symbol'>:health</span><span class='rparen'>)</span>
</code></pre>
<p>We can create any number of these links between Systems, Components, and Component Manangers as we like, simply call the method again with our other Components and Component Managers</p>
<h3 id="clearing-alternative-executions">Clearing Alternative Executions</h3>
<p>If we wish to remove these links that we created, we can do that using the follwing function in any of the following ways:</p>
<pre class="code ruby"><code class="ruby"><span class='comment'># clears ALL triggers with this system
-</span><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span>
+</span><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span>
<span class='comment'># clears ALL triggers with this Component Manager
-</span><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='rparen'>)</span>
+</span><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='rparen'>)</span>
<span class='comment'># clear the 'trigger_when_added' for this Component
-</span><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='comma'>,</span> <span class='symbol'>:added</span><span class='rparen'>)</span>
+</span><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='comma'>,</span> <span class='symbol'>:added</span><span class='rparen'>)</span>
<span class='comment'># clear the 'trigger_when_removed' for this Component
-</span><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='comma'>,</span> <span class='symbol'>:removed</span><span class='rparen'>)</span>
+</span><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='comma'>,</span> <span class='symbol'>:removed</span><span class='rparen'>)</span>
<span class='comment'># clear the 'trigger_when_is_set' for this Component specifically for the health attribute
-</span><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='comma'>,</span> <span class='symbol'>:is_set</span><span class='comma'>,</span> <span class='symbol'>:health</span><span class='rparen'>)</span>
+</span><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='comma'>,</span> <span class='symbol'>:is_set</span><span class='comma'>,</span> <span class='symbol'>:health</span><span class='rparen'>)</span>
</code></pre>
<p>Likewise we can do the same with Component Managers:</p>
<pre class="code ruby"><code class="ruby"><span class='comment'># clears ALL triggers with this Component
-</span><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='rparen'>)</span>
+</span><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='rparen'>)</span>
<span class='comment'># clear the 'trigger_when_added' for this Component Manager
-</span><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='comma'>,</span> <span class='symbol'>:added</span><span class='rparen'>)</span>
+</span><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='comma'>,</span> <span class='symbol'>:added</span><span class='rparen'>)</span>
<span class='comment'># clear the 'trigger_when_removed' for this Component Manager
-</span><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='comma'>,</span> <span class='symbol'>:removed</span><span class='rparen'>)</span>
+</span><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='comma'>,</span> <span class='symbol'>:removed</span><span class='rparen'>)</span>
<span class='comment'># clear the 'trigger_when_is_set' for this Component Manager specifically for the health attribute
-</span><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='comma'>,</span> <span class='symbol'>:is_set</span><span class='comma'>,</span> <span class='symbol'>:health</span><span class='rparen'>)</span>
+</span><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='comma'>,</span> <span class='symbol'>:is_set</span><span class='comma'>,</span> <span class='symbol'>:health</span><span class='rparen'>)</span>
</code></pre>
<h3 id="redefinition">Redefinition</h3>
<p>If we wanted to change what code or logic a given System executes, we could do that with:</p>
-<pre class="code ruby"><code class="ruby"><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_redefine'>redefine</span> <span class='kw'>do</span>
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_redefine'>redefine</span> <span class='kw'>do</span>
<span class='comment'># Some new logic or code
</span><span class='kw'>end</span>
</code></pre>
<h2 id="scenes">Scenes</h2>
<h3 id="creation">Creation</h3>
<p>Once we have all the core parts of ECS, we will want to organize our Systems. To do this we will use Scenes to group up Systems so they can quickly be enabled or disabled. Note that <a href="#alternative-execution">Alternative Executions</a> will occur even if they are not part of a Scene. Here is how we make a new Scene:</p>
-<pre class="code ruby"><code class="ruby"><span class='ivar'>@scene</span> <span class='op'>=</span> <span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Scenes</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ExampleScene</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@scene</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Scenes.html" title="FelFlame::Scenes (class)">Scenes</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FelFlame/Scenes.html#initialize-instance_method" title="FelFlame::Scenes#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ExampleScene</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
</code></pre>
<h3 id="accessing">Accessing</h3>
<p>Just like other classes in FelFlame, the name we gave the Scene is how we access it:</p>
-<pre class="code ruby"><code class="ruby"><span class='ivar'>@scene</span> <span class='op'>=</span> <span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Scenes</span><span class='op'>::</span><span class='const'>ExampleScene</span>
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@scene</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Scenes.html" title="FelFlame::Scenes (class)">Scenes</a></span></span><span class='op'>::</span><span class='const'>ExampleScene</span>
</code></pre>
<h3 id="adding-systems">Adding Systems</h3>
<p>Adding Systems is simple. We can add as many as we want. In this example we add 3 different systems:</p>
-<pre class="code ruby"><code class="ruby"><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Scenes</span><span class='op'>::</span><span class='const'>ExampleScene</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>Render</span><span class='comma'>,</span> <span class='ivar'>@system2</span><span class='comma'>,</span> <span class='ivar'>@system3</span><span class='rparen'>)</span>
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Scenes.html" title="FelFlame::Scenes (class)">Scenes</a></span></span><span class='op'>::</span><span class='const'>ExampleScene</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>Render</span><span class='comma'>,</span> <span class='ivar'>@system2</span><span class='comma'>,</span> <span class='ivar'>@system3</span><span class='rparen'>)</span>
</code></pre>
<h3 id="removing-systems">Removing Systems</h3>
<p>Removing Systems works simularly:</p>
-<pre class="code ruby"><code class="ruby"><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Scenes</span><span class='op'>::</span><span class='const'>ExampleScene</span><span class='period'>.</span><span class='id identifier rubyid_remove'>remove</span><span class='lparen'>(</span><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>Render</span><span class='comma'>,</span> <span class='ivar'>@system2</span><span class='comma'>,</span> <span class='ivar'>@system3</span><span class='rparen'>)</span>
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Scenes.html" title="FelFlame::Scenes (class)">Scenes</a></span></span><span class='op'>::</span><span class='const'>ExampleScene</span><span class='period'>.</span><span class='id identifier rubyid_remove'>remove</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>Render</span><span class='comma'>,</span> <span class='ivar'>@system2</span><span class='comma'>,</span> <span class='ivar'>@system3</span><span class='rparen'>)</span>
</code></pre>
<h3 id="clearing">Clearing</h3>
<p>If you want to remove all Systems from a Scene here is how we do it:</p>
@@ -479,25 +479,25 @@
<h3 id="adding-scenes">Adding Scenes</h3>
<p>Finally we have the Stage. There is only a single Stage and we do not have to create it as it exists by default. By adding a Scene to the Stage we are saying that the Scene is active. To add a Scene we do the following:</p>
-<pre class="code ruby"><code class="ruby"><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Stage</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span> <span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Scene</span><span class='op'>::</span><span class='const'>ExampleScene</span>
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Stage.html" title="FelFlame::Stage (class)">Stage</a></span></span><span class='period'>.</span><span class='id identifier rubyid_add'><span class='object_link'><a href="FelFlame/Stage.html#add-class_method" title="FelFlame::Stage.add (method)">add</a></span></span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'>Scene</span><span class='op'>::</span><span class='const'>ExampleScene</span>
</code></pre>
<h3 id="removing-scenes">Removing Scenes</h3>
<p>Likewise we can remove Scenes:</p>
-<pre class="code ruby"><code class="ruby"><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Stage</span><span class='period'>.</span><span class='id identifier rubyid_remove'>remove</span> <span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Scene</span><span class='op'>::</span><span class='const'>ExampleScene</span>
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Stage.html" title="FelFlame::Stage (class)">Stage</a></span></span><span class='period'>.</span><span class='id identifier rubyid_remove'><span class='object_link'><a href="FelFlame/Stage.html#remove-class_method" title="FelFlame::Stage.remove (method)">remove</a></span></span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'>Scene</span><span class='op'>::</span><span class='const'>ExampleScene</span>
</code></pre>
<h3 id="executing">Executing</h3>
<p>On each frame of the game we want to execute the Stage once. When the Stage is executed it is progressing your game 1 frame forward. The Stage will make sure for you that all the Systems from all Scenes added will be executed in the correct order according to their priority. Here is how we do it:</p>
-<pre class="code ruby"><code class="ruby"><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'>Stage</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Stage.html" title="FelFlame::Stage (class)">Stage</a></span></span><span class='period'>.</span><span class='id identifier rubyid_call'><span class='object_link'><a href="FelFlame/Stage.html#call-class_method" title="FelFlame::Stage.call (method)">call</a></span></span>
</code></pre>
<h2 id="closing-notes">Closing Notes</h2>
<p>There are some methods I haven't gone over in the overview. If you want to see everything and read in more detail check out the <a href="https://felflame.tradam.fyi">Documentation</a>!</p>
@@ -510,10 +510,10 @@
<p>If you want to contribute to development with a thanks you can always <a href="https://ko-fi.com/tradam">buy me a coffee ;^)</a></p>
</div></div>
<div id="footer">
- Generated on Sat Jul 10 03:06:03 2021 by
+ Generated on Mon Jul 12 18:28:27 2021 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.26 (ruby-2.7.3).
</div>
</div>
\ No newline at end of file