diff options
| author | realtradam <[email protected]> | 2022-01-03 07:34:38 -0500 |
|---|---|---|
| committer | realtradam <[email protected]> | 2022-01-03 07:34:38 -0500 |
| commit | 55f1db30e7a609cebd2fab27c55ece1da45be232 (patch) | |
| tree | 286045c958877ea872c69990d289dbf4c44c3c32 /docs | |
| parent | 809028c3d89993b2bb0651076ba723c11734cf3c (diff) | |
| download | FelECS-55f1db30e7a609cebd2fab27c55ece1da45be232.tar.gz FelECS-55f1db30e7a609cebd2fab27c55ece1da45be232.zip | |
.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/FelFlame.html | 14 | ||||
| -rw-r--r-- | docs/FelFlame/ComponentManager.html | 211 | ||||
| -rw-r--r-- | docs/FelFlame/Components.html | 18 | ||||
| -rw-r--r-- | docs/FelFlame/Entities.html | 52 | ||||
| -rw-r--r-- | docs/FelFlame/Order.html | 172 | ||||
| -rw-r--r-- | docs/FelFlame/Scenes.html | 62 | ||||
| -rw-r--r-- | docs/FelFlame/Stage.html | 44 | ||||
| -rw-r--r-- | docs/FelFlame/Systems.html | 148 | ||||
| -rw-r--r-- | docs/Felflame_.html | 4 | ||||
| -rw-r--r-- | docs/_index.html | 17 | ||||
| -rw-r--r-- | docs/class_list.html | 2 | ||||
| -rw-r--r-- | docs/file.README.html | 106 | ||||
| -rw-r--r-- | docs/index.html | 106 | ||||
| -rw-r--r-- | docs/method_list.html | 80 | ||||
| -rw-r--r-- | docs/top-level-namespace.html | 2 |
15 files changed, 565 insertions, 473 deletions
diff --git a/docs/FelFlame.html b/docs/FelFlame.html index ef9cb69..1ec7927 100644 --- a/docs/FelFlame.html +++ b/docs/FelFlame.html @@ -79,7 +79,7 @@ <dl> <dt>Defined in:</dt> <dd>lib/felflame.rb<span class="defines">,<br /> - lib/felflame/scene_manager.rb,<br /> lib/felflame/stage_manager.rb,<br /> lib/felflame/entity_manager.rb,<br /> lib/felflame/system_manager.rb,<br /> lib/felflame/component_manager.rb</span> + lib/felflame/order.rb,<br /> lib/felflame/scene_manager.rb,<br /> lib/felflame/stage_manager.rb,<br /> lib/felflame/entity_manager.rb,<br /> lib/felflame/system_manager.rb,<br /> lib/felflame/component_manager.rb</span> </dd> </dl> @@ -100,7 +100,7 @@ <p class="children"> - <strong class="modules">Modules:</strong> <span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">Components</a></span>, <span class='object_link'><a href="FelFlame/Stage.html" title="FelFlame::Stage (module)">Stage</a></span> + <strong class="modules">Modules:</strong> <span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">Components</a></span>, <span class='object_link'><a href="FelFlame/Order.html" title="FelFlame::Order (module)">Order</a></span>, <span class='object_link'><a href="FelFlame/Stage.html" title="FelFlame::Stage (module)">Stage</a></span> @@ -273,12 +273,12 @@ <pre class="lines"> -15 -16 -17</pre> +17 +18 +19</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame.rb', line 15</span> + <pre class="code"><span class="info file"># File 'lib/felflame.rb', line 17</span> <span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span> <span class='const'><span class='object_link'><a href="" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Stage.html" title="FelFlame::Stage (module)">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> @@ -293,7 +293,7 @@ </div> <div id="footer"> - Generated on Mon Jan 3 06:20:47 2022 by + Generated on Mon Jan 3 07:34:30 2022 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.26 (ruby-2.7.3). </div> diff --git a/docs/FelFlame/ComponentManager.html b/docs/FelFlame/ComponentManager.html index 119a7ed..143fd3a 100644 --- a/docs/FelFlame/ComponentManager.html +++ b/docs/FelFlame/ComponentManager.html @@ -102,7 +102,7 @@ <h2>Overview</h2><div class="docstring"> <div class="discussion"> -<p>Component Managers are what is used to create individual components which can be attached to entities. When a Component is created from a Component Manager that has accessors given to it, you can set or get the values of those accessors using standard ruby message sending (e.g <tt>@component.var = 5</tt>), or by using the #attrs and <span class='object_link'><a href="#update_attrs-instance_method" title="FelFlame::ComponentManager#update_attrs (method)">#update_attrs</a></span> methods instead.</p> +<p>Component Managers are what is used to create individual components which can be attached to entities. When a Component is created from a Component Manager that has accessors given to it, you can set or get the values of those accessors using standard ruby message sending (e.g <tt>@component.var = 5</tt>), or by using the <span class='object_link'><a href="#to_h-instance_method" title="FelFlame::ComponentManager#to_h (method)">#to_h</a></span> and <span class='object_link'><a href="#update_attrs-instance_method" title="FelFlame::ComponentManager#update_attrs (method)">#update_attrs</a></span> methods instead.</p> </div> @@ -312,30 +312,6 @@ <li class="public "> <span class="summary_signature"> - <a href="#attr_changed_trigger_systems-instance_method" title="#attr_changed_trigger_systems (instance method)">#<strong>attr_changed_trigger_systems</strong>(attr) ⇒ Boolean </a> - - - - </span> - - - - - - - - - - <span class="summary_desc"><div class='inline'> -<p>Execute systems that have been added to execute on variable change.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - <a href="#delete-instance_method" title="#delete (instance method)">#<strong>delete</strong> ⇒ Boolean </a> @@ -449,7 +425,7 @@ <span class="summary_desc"><div class='inline'> -<p>A hash, where all the keys are attributes linked to their respective values.</p> +<p>A hash, where all the keys are attributes storing their respective values.</p> </div></span> </li> @@ -531,6 +507,8 @@ <pre class="lines"> +154 +155 156 157 158 @@ -542,12 +520,10 @@ 164 165 166 -167 -168 -169</pre> +167</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 156</span> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 154</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_attrs'>attrs</span><span class='rparen'>)</span> <span class='comment'># Prepare the object @@ -614,12 +590,12 @@ <pre class="lines"> -206 -207 -208</pre> +202 +203 +204</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 206</span> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 202</span> <span class='kw'>def</span> <span class='id identifier rubyid_addition_triggers'>addition_triggers</span> <span class='ivar'>@addition_triggers</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> @@ -670,12 +646,12 @@ <pre class="lines"> -222 -223 -224</pre> +218 +219 +220</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 222</span> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 218</span> <span class='kw'>def</span> <span class='id identifier rubyid_attr_triggers'>attr_triggers</span> <span class='ivar'>@attr_triggers</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> @@ -726,12 +702,12 @@ <pre class="lines"> -214 -215 -216</pre> +210 +211 +212</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 214</span> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 210</span> <span class='kw'>def</span> <span class='id identifier rubyid_removal_triggers'>removal_triggers</span> <span class='ivar'>@removal_triggers</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> @@ -787,12 +763,12 @@ <pre class="lines"> -133 -134 -135</pre> +131 +132 +133</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 133</span> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 131</span> <span class='kw'>def</span> <span class='id identifier rubyid_addition_triggers'>addition_triggers</span> <span class='ivar'>@addition_triggers</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> @@ -843,12 +819,12 @@ <pre class="lines"> -149 -150 -151</pre> +147 +148 +149</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 149</span> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 147</span> <span class='kw'>def</span> <span class='id identifier rubyid_attr_triggers'>attr_triggers</span> <span class='ivar'>@attr_triggers</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> @@ -899,12 +875,12 @@ <pre class="lines"> -141 -142 -143</pre> +139 +140 +141</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 141</span> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 139</span> <span class='kw'>def</span> <span class='id identifier rubyid_removal_triggers'>removal_triggers</span> <span class='ivar'>@removal_triggers</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> @@ -922,78 +898,7 @@ <div class="method_details first"> - <h3 class="signature first" id="attr_changed_trigger_systems-instance_method"> - - #<strong>attr_changed_trigger_systems</strong>(attr) ⇒ <tt>Boolean</tt> - - - - - -</h3><div class="docstring"> - <div class="discussion"> - -<p>Execute systems that have been added to execute on variable change</p> - - - </div> -</div> -<div class="tags"> - -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>Boolean</tt>)</span> - - - - — - <div class='inline'> -<p><code>true</code></p> -</div> - - </li> - -</ul> - -</div><table class="source_code"> - <tr> - <td> - <pre class="lines"> - - -260 -261 -262 -263 -264 -265 -266 -267 -268</pre> - </td> - <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 260</span> - -<span class='kw'>def</span> <span class='id identifier rubyid_attr_changed_trigger_systems'>attr_changed_trigger_systems</span><span class='lparen'>(</span><span class='id identifier rubyid_attr'>attr</span><span class='rparen'>)</span> - <span class='id identifier rubyid_systems_to_execute'>systems_to_execute</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span> - <span class='id identifier rubyid_systems_to_execute'>systems_to_execute</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_systems_to_execute'>systems_to_execute</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> - - <span class='id identifier rubyid_systems_to_execute'>systems_to_execute</span> <span class='op'>|=</span> <span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> - - <span class='id identifier rubyid_systems_to_execute'>systems_to_execute</span><span class='period'>.</span><span class='id identifier rubyid_sort_by'>sort_by</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:priority</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_reverse_each'>reverse_each</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:call</span><span class='rparen'>)</span> - <span class='kw'>true</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="delete-instance_method"> + <h3 class="signature first" id="delete-instance_method"> #<strong>delete</strong> ⇒ <tt>Boolean</tt> @@ -1036,6 +941,8 @@ <pre class="lines"> +269 +270 271 272 273 @@ -1046,12 +953,10 @@ 278 279 280 -281 -282 -283</pre> +281</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 271</span> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 269</span> <span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span> <span class='id identifier rubyid_addition_triggers'>addition_triggers</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_system'>system</span><span class='op'>|</span> @@ -1110,12 +1015,12 @@ <pre class="lines"> -235 -236 -237</pre> +231 +232 +233</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 235</span> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 231</span> <span class='kw'>def</span> <span class='id identifier rubyid_entities'>entities</span> <span class='ivar'>@entities</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> @@ -1164,17 +1069,17 @@ <pre class="lines"> +237 +238 +239 +240 241 242 243 -244 -245 -246 -247 -248</pre> +244</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 241</span> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 237</span> <span class='kw'>def</span> <span class='id identifier rubyid_entity'>entity</span> <span class='kw'>if</span> <span class='id identifier rubyid_entities'>entities</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> @@ -1201,7 +1106,7 @@ </h3><div class="docstring"> <div class="discussion"> -<p>Returns A hash, where all the keys are attributes linked to their respective values.</p> +<p>Returns A hash, where all the keys are attributes storing their respective values.</p> </div> @@ -1220,7 +1125,7 @@ — <div class='inline'> -<p>A hash, where all the keys are attributes linked to their respective values.</p> +<p>A hash, where all the keys are attributes storing their respective values.</p> </div> </li> @@ -1233,16 +1138,16 @@ <pre class="lines"> +284 +285 286 287 288 289 -290 -291 -292</pre> +290</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 286</span> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 284</span> <span class='kw'>def</span> <span class='id identifier rubyid_to_h'>to_h</span> <span class='id identifier rubyid_return_hash'>return_hash</span> <span class='op'>=</span> <span class='id identifier rubyid_instance_variables'>instance_variables</span><span class='period'>.</span><span class='id identifier rubyid_each_with_object'>each_with_object</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_final'>final</span><span class='op'>|</span> @@ -1300,14 +1205,14 @@ <pre class="lines"> -252 -253 -254 -255 -256</pre> +248 +249 +250 +251 +252</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 252</span> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 248</span> <span class='kw'>def</span> <span class='id identifier rubyid_update_attrs'>update_attrs</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span> <span class='id identifier rubyid_opts'>opts</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_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span> @@ -1324,7 +1229,7 @@ </div> <div id="footer"> - Generated on Mon Jan 3 06:20:47 2022 by + Generated on Mon Jan 3 07:34:30 2022 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.26 (ruby-2.7.3). </div> diff --git a/docs/FelFlame/Components.html b/docs/FelFlame/Components.html index 33d82b3..37c11bf 100644 --- a/docs/FelFlame/Components.html +++ b/docs/FelFlame/Components.html @@ -88,7 +88,7 @@ <h2>Overview</h2><div class="docstring"> <div class="discussion"> -<p>Creates component managers and allows accessing them them under the <span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span> namespace as Constants.</p> +<p>Creates component managers and allows accessing them them under the <span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span> namespace as Constants. You can use array methods directly on this class to access Component Managers.</p> <p>To see how component managers are used please look at the <span class='object_link'><a href="ComponentManager.html" title="FelFlame::ComponentManager (class)">ComponentManager</a></span> documentation.</p> @@ -249,8 +249,6 @@ <pre class="lines"> -18 -19 20 21 22 @@ -278,24 +276,26 @@ 44 45 46 -47</pre> +47 +48 +49</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 18</span> + <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 20</span> <span class='kw'>def</span> <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_attrs'>attrs</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_attrs_with_defaults'>attrs_with_defaults</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_defined?'>const_defined?</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span> <span class='id identifier rubyid_raise'>raise</span><span class='lparen'>(</span><span class='const'>NameError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Component Manager '</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_component_name'>component_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>' is already defined</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>end</span> - <span class='id identifier rubyid_const_set'>const_set</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='comma'>,</span> <span class='const'>Class</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 (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="ComponentManager.html" title="FelFlame::ComponentManager (class)">ComponentManager</a></span></span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='id identifier rubyid_update_const_cache'>update_const_cache</span> <span class='id identifier rubyid_attrs'>attrs</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_attr'>attr</span><span class='op'>|</span> - <span class='kw'>if</span> <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_method_defined?'>method_defined?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_method_defined?'>method_defined?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> - <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NameError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>The attribute name \"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_content'>\" is already a method</span><span class='tstring_end'>"</span></span> + <span class='kw'>if</span> <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_method_defined?'>method_defined?</span><span class='lparen'>(</span><span class='id identifier rubyid_attr'>attr</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_method_defined?'>method_defined?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> + <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NameError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>The attribute name \"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_content'>\" is already a method</span><span class='tstring_end'>"</span></span> <span class='kw'>end</span> + <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_attr_accessor'>attr_accessor</span> <span class='id identifier rubyid_attr'>attr</span> <span class='kw'>end</span> <span class='id identifier rubyid_attrs_with_defaults'>attrs_with_defaults</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_attr'>attr</span><span class='comma'>,</span> <span class='id identifier rubyid__default'>_default</span><span class='op'>|</span> @@ -323,7 +323,7 @@ </div> <div id="footer"> - Generated on Mon Jan 3 06:20:47 2022 by + Generated on Mon Jan 3 07:34:30 2022 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.26 (ruby-2.7.3). </div> diff --git a/docs/FelFlame/Entities.html b/docs/FelFlame/Entities.html index 4308d4b..43d61fa 100644 --- a/docs/FelFlame/Entities.html +++ b/docs/FelFlame/Entities.html @@ -104,7 +104,7 @@ <h2>Overview</h2><div class="docstring"> <div class="discussion"> -<p>Creates and manages Entities. Allows iterating or accessing Entities using array methods directly on the class. Entities are just collections of Components.</p> +<p>Creates and manages Entities. Entities are just collections of Components. You can use array methods directly on this class to access Entities.</p> </div> @@ -325,14 +325,14 @@ <pre class="lines"> -7 8 9 10 -11</pre> +11 +12</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/entity_manager.rb', line 7</span> + <pre class="code"><span class="info file"># File 'lib/felflame/entity_manager.rb', line 8</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_components'>components</span><span class='rparen'>)</span> <span class='comment'># Add each component @@ -415,7 +415,6 @@ <pre class="lines"> -56 57 58 59 @@ -428,10 +427,11 @@ 66 67 68 -69</pre> +69 +70</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/entity_manager.rb', line 56</span> + <pre class="code"><span class="info file"># File 'lib/felflame/entity_manager.rb', line 57</span> <span class='kw'>def</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_components_to_add'>components_to_add</span><span class='rparen'>)</span> <span class='id identifier rubyid_components_to_add'>components_to_add</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> @@ -464,7 +464,7 @@ </h3><div class="docstring"> <div class="discussion"> -<p>A single component from a component manager. Use this if you expect the component to only belong to one entity and you want to access it. Access the component using either parameter notation or array notation.</p> +<p>A single component from a component manager. Use this if you expect the component to only belong to one entity and you want to access it. Access the component using either parameter notation or array notation. Array notation is conventional for better readablility.</p> </div> @@ -475,7 +475,7 @@ <p class="tag_title">Examples:</p> - <pre class="example code"><code><span class='ivar'>@entity</span><span class='period'>.</span><span class='id identifier rubyid_component'>component</span><span class='lbracket'>[</span><span class='ivar'>@component_manager</span><span class='rbracket'>]</span> <span class='comment'># array notation + <pre class="example code"><code><span class='ivar'>@entity</span><span class='period'>.</span><span class='id identifier rubyid_component'>component</span><span class='lbracket'>[</span><span class='ivar'>@component_manager</span><span class='rbracket'>]</span> <span class='comment'># array notation(the standard) </span><span class='ivar'>@entity</span><span class='period'>.</span><span class='id identifier rubyid_component'>component</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='rparen'>)</span> <span class='comment'># method notation</span></code></pre> </div> @@ -522,7 +522,6 @@ <pre class="lines"> -25 26 27 28 @@ -534,10 +533,12 @@ 34 35 36 -37</pre> +37 +38 +39</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/entity_manager.rb', line 25</span> + <pre class="code"><span class="info file"># File 'lib/felflame/entity_manager.rb', line 26</span> <span class='kw'>def</span> <span class='id identifier rubyid_component'>component</span><span class='lparen'>(</span><span class='id identifier rubyid_manager'>manager</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_manager'>manager</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> @@ -549,6 +550,7 @@ <span class='kw'>elsif</span> <span class='id identifier rubyid_components'>components</span><span class='lbracket'>[</span><span class='id identifier rubyid_manager'>manager</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>></span> <span class='int'>1</span> <span class='const'>Warning</span><span class='period'>.</span><span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>This entity has MANY of this component but you called the method that is intended for having a single of this component type.\nYou may have a bug in your logic.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>end</span> + <span class='id identifier rubyid_components'>components</span><span class='lbracket'>[</span><span class='id identifier rubyid_manager'>manager</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span> <span class='kw'>end</span> <span class='kw'>end</span></pre> @@ -596,12 +598,12 @@ <pre class="lines"> -15 16 -17</pre> +17 +18</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/entity_manager.rb', line 15</span> + <pre class="code"><span class="info file"># File 'lib/felflame/entity_manager.rb', line 16</span> <span class='kw'>def</span> <span class='id identifier rubyid_components'>components</span> <span class='ivar'>@components</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> @@ -655,7 +657,6 @@ <pre class="lines"> -42 43 44 45 @@ -664,13 +665,14 @@ 48 49 50 -51</pre> +51 +52</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/entity_manager.rb', line 42</span> + <pre class="code"><span class="info file"># File 'lib/felflame/entity_manager.rb', line 43</span> <span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span> - <span class='id identifier rubyid_components'>components</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_manager'>component_manager</span><span class='comma'>,</span> <span class='id identifier rubyid_component_array'>component_array</span><span class='op'>|</span> + <span class='id identifier rubyid_components'>components</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_manager'>_component_manager</span><span class='comma'>,</span> <span class='id identifier rubyid_component_array'>component_array</span><span class='op'>|</span> <span class='id identifier rubyid_component_array'>component_array</span><span class='period'>.</span><span class='id identifier rubyid_reverse_each'>reverse_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='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_entities'>entities</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> <span class='kw'>end</span> @@ -748,7 +750,6 @@ <pre class="lines"> -86 87 88 89 @@ -757,20 +758,17 @@ 92 93 94 -95 -96</pre> +95</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/entity_manager.rb', line 86</span> + <pre class="code"><span class="info file"># File 'lib/felflame/entity_manager.rb', line 87</span> <span class='kw'>def</span> <span class='id identifier rubyid_remove'>remove</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_components_to_remove'>components_to_remove</span><span class='rparen'>)</span> <span class='id identifier rubyid_components_to_remove'>components_to_remove</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='id identifier rubyid_check_systems'>check_systems</span> <span class='id identifier rubyid_component'>component</span><span class='comma'>,</span> <span class='symbol'>:removal_triggers</span> <span class='kw'>if</span> <span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_entities'>entities</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='kw'>self</span> <span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_entities'>entities</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='kw'>self</span> <span class='id identifier rubyid_components'>components</span><span class='lbracket'>[</span><span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='id identifier rubyid_component'>component</span> - <span class='kw'>if</span> <span class='id identifier rubyid_components'>components</span><span class='lbracket'>[</span><span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> - <span class='id identifier rubyid_components'>components</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span> - <span class='kw'>end</span> + <span class='id identifier rubyid_components'>components</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span> <span class='kw'>if</span> <span class='id identifier rubyid_components'>components</span><span class='lbracket'>[</span><span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='kw'>end</span> <span class='kw'>true</span> <span class='kw'>end</span></pre> @@ -784,7 +782,7 @@ </div> <div id="footer"> - Generated on Mon Jan 3 06:20:47 2022 by + Generated on Mon Jan 3 07:34:30 2022 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.26 (ruby-2.7.3). </div> diff --git a/docs/FelFlame/Order.html b/docs/FelFlame/Order.html new file mode 100644 index 0000000..b17a786 --- /dev/null +++ b/docs/FelFlame/Order.html @@ -0,0 +1,172 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<title> + Module: FelFlame::Order + + — Documentation by YARD 0.9.26 + +</title> + + <link rel="stylesheet" href="../css/style.css" type="text/css" /> + + <link rel="stylesheet" href="../css/common.css" type="text/css" /> + +<script type="text/javascript"> + pathId = "FelFlame::Order"; + relpath = '../'; +</script> + + + <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script> + + <script type="text/javascript" charset="utf-8" src="../js/app.js"></script> + + + </head> + <body> + <div class="nav_wrap"> + <iframe id="nav" src="../class_list.html?1"></iframe> + <div id="resizer"></div> + </div> + + <div id="main" tabindex="-1"> + <div id="header"> + <div id="menu"> + + <a href="../_index.html">Index (O)</a> » + <span class='title'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span> + » + <span class="title">Order</span> + +</div> + + <div id="search"> + + <a class="full_list_link" id="class_list_link" + href="../class_list.html"> + + <svg width="24" height="24"> + <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect> + <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect> + <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect> + </svg> + </a> + +</div> + <div class="clear"></div> + </div> + + <div id="content"><h1>Module: FelFlame::Order + + + +</h1> +<div class="box_info"> + + + + + + + + + + + + <dl> + <dt>Defined in:</dt> + <dd>lib/felflame/order.rb</dd> + </dl> + +</div> + + + + + + + + + + <h2> + Instance Method Summary + <small><a href="#" class="summary_toggle">collapse</a></small> + </h2> + + <ul class="summary"> + + <li class="public "> + <span class="summary_signature"> + + <a href="#sort-instance_method" title="#sort (instance method)">#<strong>sort</strong>(*sortables) ⇒ Object </a> + + + + </span> + + + + + + + + + + <span class="summary_desc"><div class='inline'></div></span> + +</li> + + + </ul> + + + + + <div id="instance_method_details" class="method_details_list"> + <h2>Instance Method Details</h2> + + + <div class="method_details first"> + <h3 class="signature first" id="sort-instance_method"> + + #<strong>sort</strong>(*sortables) ⇒ <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +3 +4</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/felflame/order.rb', line 3</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_sort'>sort</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_sortables'>sortables</span><span class='rparen'>)</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + </div> + +</div> + + <div id="footer"> + Generated on Mon Jan 3 07:34:30 2022 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> + </body> +</html>
\ No newline at end of file diff --git a/docs/FelFlame/Scenes.html b/docs/FelFlame/Scenes.html index 5a73e20..6245fa6 100644 --- a/docs/FelFlame/Scenes.html +++ b/docs/FelFlame/Scenes.html @@ -106,8 +106,6 @@ <p>Creates and manages Scenes. Scenes are collections of Systems, and execute all the Systems when called upon. Any scenes you create are accessable under the <span class='object_link'><a href="" title="FelFlame::Scenes (class)">Scenes</a></span> namespace as Constants.</p> -<p>TODO: Improve Scenes overview</p> - </div> </div> @@ -364,13 +362,13 @@ <pre class="lines"> -20 -21 22 -23</pre> +23 +24 +25</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/scene_manager.rb', line 20</span> + <pre class="code"><span class="info file"># File 'lib/felflame/scene_manager.rb', line 22</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='label'>priority:</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_priority'>priority</span> <span class='op'>=</span> <span class='id identifier rubyid_priority'>priority</span> @@ -414,12 +412,12 @@ <pre class="lines"> -10 -11 -12</pre> +12 +13 +14</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/scene_manager.rb', line 10</span> + <pre class="code"><span class="info file"># File 'lib/felflame/scene_manager.rb', line 12</span> <span class='kw'>def</span> <span class='id identifier rubyid_priority'>priority</span> <span class='ivar'>@priority</span> @@ -470,12 +468,12 @@ <pre class="lines"> -27 -28 -29</pre> +29 +30 +31</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/scene_manager.rb', line 27</span> + <pre class="code"><span class="info file"># File 'lib/felflame/scene_manager.rb', line 29</span> <span class='kw'>def</span> <span class='id identifier rubyid_systems'>systems</span> <span class='ivar'>@systems</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> @@ -536,17 +534,17 @@ <pre class="lines"> -40 -41 42 43 44 45 46 -47</pre> +47 +48 +49</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/scene_manager.rb', line 40</span> + <pre class="code"><span class="info file"># File 'lib/felflame/scene_manager.rb', line 42</span> <span class='kw'>def</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_systems_to_add'>systems_to_add</span><span class='rparen'>)</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_systems'>systems</span> <span class='op'>|=</span> <span class='id identifier rubyid_systems_to_add'>systems_to_add</span> @@ -605,13 +603,13 @@ <pre class="lines"> -33 -34 35 -36</pre> +36 +37 +38</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/scene_manager.rb', line 33</span> + <pre class="code"><span class="info file"># File 'lib/felflame/scene_manager.rb', line 35</span> <span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span> <span class='id identifier rubyid_systems'>systems</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:call</span><span class='rparen'>)</span> @@ -666,24 +664,24 @@ <pre class="lines"> -58 -59 60 61 62 63 64 -65</pre> +65 +66 +67</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/scene_manager.rb', line 58</span> + <pre class="code"><span class="info file"># File 'lib/felflame/scene_manager.rb', line 60</span> <span class='kw'>def</span> <span class='id identifier rubyid_clear'>clear</span> <span class='id identifier rubyid_systems'>systems</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_system'>system</span><span class='op'>|</span> <span class='id identifier rubyid_system'>system</span><span class='period'>.</span><span class='id identifier rubyid_scenes'>scenes</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='kw'>self</span> <span class='kw'>end</span> <span class='id identifier rubyid_systems'>systems</span><span class='period'>.</span><span class='id identifier rubyid_clear'>clear</span> - <span class='comment'>#FelFlame::Stage.update_systems_list if FelFlame::Stage.scenes.include? self + <span class='comment'># FelFlame::Stage.update_systems_list if FelFlame::Stage.scenes.include? self </span> <span class='kw'>true</span> <span class='kw'>end</span></pre> </td> @@ -735,13 +733,13 @@ <pre class="lines"> -51 -52 53 -54</pre> +54 +55 +56</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/scene_manager.rb', line 51</span> + <pre class="code"><span class="info file"># File 'lib/felflame/scene_manager.rb', line 53</span> <span class='kw'>def</span> <span class='id identifier rubyid_remove'>remove</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_systems_to_remove'>systems_to_remove</span><span class='rparen'>)</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_systems'>systems</span> <span class='op'>-=</span> <span class='id identifier rubyid_systems_to_remove'>systems_to_remove</span> @@ -757,7 +755,7 @@ </div> <div id="footer"> - Generated on Mon Jan 3 06:20:47 2022 by + Generated on Mon Jan 3 07:34:30 2022 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.26 (ruby-2.7.3). </div> diff --git a/docs/FelFlame/Stage.html b/docs/FelFlame/Stage.html index 892810b..e944f44 100644 --- a/docs/FelFlame/Stage.html +++ b/docs/FelFlame/Stage.html @@ -289,12 +289,12 @@ <pre class="lines"> -40 -41 -42</pre> +42 +43 +44</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/stage_manager.rb', line 40</span> + <pre class="code"><span class="info file"># File 'lib/felflame/stage_manager.rb', line 42</span> <span class='kw'>def</span> <span class='id identifier rubyid_scenes'>scenes</span> <span class='ivar'>@scenes</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> @@ -355,14 +355,14 @@ <pre class="lines"> -11 -12 13 14 -15</pre> +15 +16 +17</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/stage_manager.rb', line 11</span> + <pre class="code"><span class="info file"># File 'lib/felflame/stage_manager.rb', line 13</span> <span class='kw'>def</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_scenes_to_add'>scenes_to_add</span><span class='rparen'>)</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scenes'>scenes</span> <span class='op'>|=</span> <span class='id identifier rubyid_scenes_to_add'>scenes_to_add</span> @@ -386,7 +386,7 @@ </h3><div class="docstring"> <div class="discussion"> -<p>Executes one frame of the game. This executes all the Systems in the Scenes added to the Stage. Systems that exist in two or more different Scenes will still only get executed once.</p> +<p>Executes one frame of the game. This executes all the Scenes added to the Stage in order of their priority.</p> </div> @@ -418,13 +418,13 @@ <pre class="lines"> -33 -34 35 -36</pre> +36 +37 +38</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/stage_manager.rb', line 33</span> + <pre class="code"><span class="info file"># File 'lib/felflame/stage_manager.rb', line 35</span> <span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scenes'>scenes</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:call</span><span class='rparen'>)</span> @@ -479,13 +479,13 @@ <pre class="lines"> -26 -27 28 -29</pre> +29 +30 +31</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/stage_manager.rb', line 26</span> + <pre class="code"><span class="info file"># File 'lib/felflame/stage_manager.rb', line 28</span> <span class='kw'>def</span> <span class='id identifier rubyid_clear'>clear</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scenes'>scenes</span><span class='period'>.</span><span class='id identifier rubyid_clear'>clear</span> @@ -540,13 +540,13 @@ <pre class="lines"> -19 -20 21 -22</pre> +22 +23 +24</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/stage_manager.rb', line 19</span> + <pre class="code"><span class="info file"># File 'lib/felflame/stage_manager.rb', line 21</span> <span class='kw'>def</span> <span class='id identifier rubyid_remove'>remove</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_scenes_to_remove'>scenes_to_remove</span><span class='rparen'>)</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scenes'>scenes</span> <span class='op'>-=</span> <span class='id identifier rubyid_scenes_to_remove'>scenes_to_remove</span> @@ -562,7 +562,7 @@ </div> <div id="footer"> - Generated on Mon Jan 3 06:20:47 2022 by + Generated on Mon Jan 3 07:34:30 2022 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.26 (ruby-2.7.3). </div> diff --git a/docs/FelFlame/Systems.html b/docs/FelFlame/Systems.html index 7f5d18c..be6a374 100644 --- a/docs/FelFlame/Systems.html +++ b/docs/FelFlame/Systems.html @@ -104,9 +104,7 @@ <h2>Overview</h2><div class="docstring"> <div class="discussion"> -<p>Creates an manages Systems. Systems are the logic of the game and do not contain any data within them. Any systems you create are accessable under the <span class='object_link'><a href="" title="FelFlame::Systems (class)">Systems</a></span> namespace as Constants.</p> - -<p>TODO: Improve Systems overview</p> +<p>Creates and manages Systems. Systems are the logic of the game and do not contain any data within them. Any systems you create are accessable under the <span class='object_link'><a href="" title="FelFlame::Systems (class)">Systems</a></span> namespace as Constants. You can use array methods directly on this class to access Systems.</p> </div> @@ -576,16 +574,16 @@ <pre class="lines"> +115 116 117 118 119 120 -121 -122</pre> +121</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 116</span> + <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 115</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='label'>priority:</span> <span class='int'>0</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span> <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Systems (class)">Systems</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_set'>const_set</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='kw'>self</span><span class='rparen'>)</span> @@ -645,12 +643,12 @@ <pre class="lines"> -33 -34 -35</pre> +35 +36 +37</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 33</span> + <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 35</span> <span class='kw'>def</span> <span class='id identifier rubyid_addition_triggers'>addition_triggers</span> <span class='ivar'>@addition_triggers</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> @@ -701,12 +699,12 @@ <pre class="lines"> -51 52 -53</pre> +53 +54</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 51</span> + <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 52</span> <span class='kw'>def</span> <span class='id identifier rubyid_attr_triggers'>attr_triggers</span> <span class='ivar'>@attr_triggers</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> @@ -744,12 +742,12 @@ <pre class="lines"> -4 -5 -6</pre> +6 +7 +8</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 4</span> + <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 6</span> <span class='kw'>def</span> <span class='id identifier rubyid_priority'>priority</span> <span class='ivar'>@priority</span> @@ -800,12 +798,12 @@ <pre class="lines"> -42 -43 -44</pre> +44 +45 +46</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 42</span> + <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 44</span> <span class='kw'>def</span> <span class='id identifier rubyid_removal_triggers'>removal_triggers</span> <span class='ivar'>@removal_triggers</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> @@ -832,12 +830,12 @@ <pre class="lines"> -17 -18 -19</pre> +19 +20 +21</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 17</span> + <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 19</span> <span class='kw'>def</span> <span class='id identifier rubyid_scenes'>scenes</span> <span class='ivar'>@scenes</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> @@ -927,12 +925,12 @@ <pre class="lines"> +124 125 -126 -127</pre> +126</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 125</span> + <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 124</span> <span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span> <span class='ivar'>@block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span> @@ -1110,23 +1108,22 @@ 219 220 221 -222 -223</pre> +222</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 157</span> <span class='kw'>def</span> <span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_trigger_types'>trigger_types</span><span class='comma'>,</span> <span class='label'>component_or_manager:</span> <span class='kw'>nil</span><span class='rparen'>)</span> - <span class='id identifier rubyid_trigger_types'>trigger_types</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:addition_triggers</span><span class='comma'>,</span> <span class='symbol'>:removal_triggers</span><span class='comma'>,</span> <span class='symbol'>:attr_triggers</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_trigger_types'>trigger_types</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> + <span class='id identifier rubyid_trigger_types'>trigger_types</span> <span class='op'>=</span> <span class='qsymbols_beg'>%i[</span><span class='tstring_content'>addition_triggers</span><span class='words_sep'> </span><span class='tstring_content'>removal_triggers</span><span class='words_sep'> </span><span class='tstring_content'>attr_triggers</span><span class='tstring_end'>]</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_trigger_types'>trigger_types</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='kw'>if</span> <span class='id identifier rubyid_trigger_types'>trigger_types</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='symbol'>:attr_triggers</span> - <span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_trigger_types'>trigger_types</span> <span class='op'>-</span> <span class='lbracket'>[</span><span class='symbol'>:addition_triggers</span><span class='comma'>,</span> - <span class='symbol'>:removal_triggers</span><span class='comma'>,</span> - <span class='symbol'>:attr_triggers</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> + <span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_trigger_types'>trigger_types</span> <span class='op'>-</span> <span class='qsymbols_beg'>%i[</span><span class='tstring_content'>addition_triggers</span><span class='words_sep'> + </span><span class='tstring_content'>removal_triggers</span><span class='words_sep'> + </span><span class='tstring_content'>attr_triggers</span><span class='tstring_end'>]</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='kw'>if</span> <span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> - <span class='comment'>#remove all attrs -</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</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_cmp_or_mgr'>cmp_or_mgr</span><span class='comma'>,</span> <span class='id identifier rubyid_attrs'>attrs</span><span class='op'>|</span> + <span class='comment'># remove all attrs +</span> <span class='id identifier rubyid_attr_triggers'>attr_triggers</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_cmp_or_mgr'>cmp_or_mgr</span><span class='comma'>,</span> <span class='id identifier rubyid_attrs'>attrs</span><span class='op'>|</span> <span class='id identifier rubyid_attrs'>attrs</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_attr'>attr</span><span class='op'>|</span> <span class='kw'>next</span> <span class='kw'>if</span> <span class='id identifier rubyid_cmp_or_mgr'>cmp_or_mgr</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> @@ -1135,49 +1132,48 @@ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='kw'>end</span> <span class='kw'>else</span> - <span class='comment'>#remove attrs relevant to comp_or_man -</span> <span class='kw'>unless</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> - <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</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_attr'>attr</span><span class='op'>|</span> + <span class='comment'># remove attrs relevant to comp_or_man +</span> <span class='kw'>unless</span> <span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> + <span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</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_attr'>attr</span><span class='op'>|</span> <span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='kw'>self</span> <span class='kw'>end</span> - <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> + <span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='kw'>end</span> <span class='kw'>end</span> - <span class='kw'>else</span> + <span class='kw'>elsif</span> <span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> - <span class='kw'>if</span> <span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> - <span class='lparen'>(</span><span class='id identifier rubyid_trigger_types'>trigger_types</span> <span class='op'>-</span> <span class='lbracket'>[</span><span class='symbol'>:addition_triggers</span><span class='comma'>,</span> <span class='symbol'>:removal_triggers</span><span class='comma'>,</span> <span class='symbol'>:attr_triggers</span><span class='rbracket'>]</span><span class='rparen'>)</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_attr'>attr</span><span class='op'>|</span> - <span class='comment'>#remove attr -</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</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_cmp_or_mgr'>cmp_or_mgr</span><span class='comma'>,</span> <span class='id identifier rubyid_attrs'>attrs</span><span class='op'>|</span> - <span class='id identifier rubyid_cmp_or_mgr'>cmp_or_mgr</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='kw'>self</span> - <span class='kw'>end</span> + <span class='lparen'>(</span><span class='id identifier rubyid_trigger_types'>trigger_types</span> <span class='op'>-</span> <span class='qsymbols_beg'>%i[</span><span class='tstring_content'>addition_triggers</span><span class='words_sep'> </span><span class='tstring_content'>removal_triggers</span><span class='words_sep'> </span><span class='tstring_content'>attr_triggers</span><span class='tstring_end'>]</span></span><span class='rparen'>)</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_attr'>attr</span><span class='op'>|</span> + <span class='comment'># remove attr +</span> <span class='id identifier rubyid_attr_triggers'>attr_triggers</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_cmp_or_mgr'>cmp_or_mgr</span><span class='comma'>,</span> <span class='id identifier rubyid__attrs'>_attrs</span><span class='op'>|</span> + <span class='id identifier rubyid_cmp_or_mgr'>cmp_or_mgr</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='kw'>self</span> <span class='kw'>end</span> - <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='lparen'>(</span><span class='id identifier rubyid_trigger_types'>trigger_types</span> <span class='op'>-</span> <span class='lbracket'>[</span><span class='symbol'>:addition_triggers</span><span class='comma'>,</span> - <span class='symbol'>:removal_triggers</span><span class='comma'>,</span> - <span class='symbol'>:attr_triggers</span><span class='rbracket'>]</span><span class='rparen'>)</span> - <span class='kw'>else</span> - <span class='comment'>#remove attr from component_or_manager -</span> <span class='lparen'>(</span><span class='id identifier rubyid_trigger_types'>trigger_types</span> <span class='op'>-</span> <span class='lbracket'>[</span><span class='symbol'>:addition_triggers</span><span class='comma'>,</span> <span class='symbol'>:removal_triggers</span><span class='comma'>,</span> <span class='symbol'>:attr_triggers</span><span class='rbracket'>]</span><span class='rparen'>)</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_attr'>attr</span><span class='op'>|</span> - <span class='kw'>next</span> <span class='kw'>if</span> <span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> - <span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='kw'>self</span> - <span class='kw'>end</span> - <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span> <span class='op'>-=</span> <span class='id identifier rubyid_trigger_types'>trigger_types</span> <span class='kw'>unless</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>end</span> + <span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_trigger_types'>trigger_types</span> <span class='op'>-</span> <span class='qsymbols_beg'>%i[</span><span class='tstring_content'>addition_triggers</span><span class='words_sep'> + </span><span class='tstring_content'>removal_triggers</span><span class='words_sep'> + </span><span class='tstring_content'>attr_triggers</span><span class='tstring_end'>]</span></span><span class='rparen'>)</span> + <span class='kw'>else</span> + <span class='comment'># remove attr from component_or_manager +</span> <span class='lparen'>(</span><span class='id identifier rubyid_trigger_types'>trigger_types</span> <span class='op'>-</span> <span class='qsymbols_beg'>%i[</span><span class='tstring_content'>addition_triggers</span><span class='words_sep'> </span><span class='tstring_content'>removal_triggers</span><span class='words_sep'> </span><span class='tstring_content'>attr_triggers</span><span class='tstring_end'>]</span></span><span class='rparen'>)</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_attr'>attr</span><span class='op'>|</span> + <span class='kw'>next</span> <span class='kw'>if</span> <span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> + + <span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='kw'>self</span> + <span class='kw'>end</span> + <span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span> <span class='op'>-=</span> <span class='id identifier rubyid_trigger_types'>trigger_types</span> <span class='kw'>unless</span> <span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>end</span> <span class='kw'>end</span> - <span class='lparen'>(</span><span class='id identifier rubyid_trigger_types'>trigger_types</span> <span class='op'>&</span> <span class='lbracket'>[</span><span class='symbol'>:removal_triggers</span><span class='comma'>,</span> <span class='symbol'>:addition_triggers</span><span class='rbracket'>]</span> <span class='op'>-</span> <span class='lbracket'>[</span><span class='symbol'>:attr_triggers</span><span class='rbracket'>]</span><span class='rparen'>)</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_trigger_type'>trigger_type</span><span class='op'>|</span> + <span class='lparen'>(</span><span class='id identifier rubyid_trigger_types'>trigger_types</span> <span class='op'>&</span> <span class='qsymbols_beg'>%i[</span><span class='tstring_content'>removal_triggers</span><span class='words_sep'> </span><span class='tstring_content'>addition_triggers</span><span class='tstring_end'>]</span></span> <span class='op'>-</span> <span class='lbracket'>[</span><span class='symbol'>:attr_triggers</span><span class='rbracket'>]</span><span class='rparen'>)</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_trigger_type'>trigger_type</span><span class='op'>|</span> <span class='kw'>if</span> <span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> - <span class='comment'>#remove all removal triggers -</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_trigger_type'>trigger_type</span><span class='rparen'>)</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_trigger'>trigger</span><span class='op'>|</span> + <span class='comment'># remove all removal triggers +</span> <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_trigger_type'>trigger_type</span><span class='rparen'>)</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_trigger'>trigger</span><span class='op'>|</span> <span class='id identifier rubyid_trigger'>trigger</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_trigger_type'>trigger_type</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='kw'>self</span> <span class='kw'>end</span> - <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_trigger_type'>trigger_type</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> + <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_trigger_type'>trigger_type</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>else</span> - <span class='comment'>#remove removal trigger relevant to comp/man -</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_trigger_type'>trigger_type</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='id identifier rubyid_component_or_manager'>component_or_manager</span> + <span class='comment'># remove removal trigger relevant to comp/man +</span> <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_trigger_type'>trigger_type</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='id identifier rubyid_component_or_manager'>component_or_manager</span> <span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_trigger_type'>trigger_type</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='kw'>self</span> <span class='kw'>end</span> <span class='kw'>end</span> @@ -1313,14 +1309,14 @@ <pre class="lines"> +227 228 229 230 -231 -232</pre> +231</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 228</span> + <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 227</span> <span class='kw'>def</span> <span class='id identifier rubyid_trigger_when_added'>trigger_when_added</span><span class='lparen'>(</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rparen'>)</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_addition_triggers'>addition_triggers</span> <span class='op'>|=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span> @@ -1376,6 +1372,7 @@ <pre class="lines"> +244 245 246 247 @@ -1387,11 +1384,10 @@ 253 254 255 -256 -257</pre> +256</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 245</span> + <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 244</span> <span class='kw'>def</span> <span class='id identifier rubyid_trigger_when_is_changed'>trigger_when_is_changed</span><span class='lparen'>(</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='comma'>,</span> <span class='id identifier rubyid_attr'>attr</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> @@ -1399,10 +1395,10 @@ <span class='kw'>else</span> <span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span> <span class='op'>|=</span> <span class='lbracket'>[</span><span class='kw'>self</span><span class='rbracket'>]</span> <span class='kw'>end</span> - <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> - <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span> + <span class='kw'>if</span> <span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> + <span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span> <span class='kw'>else</span> - <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span> <span class='op'>|=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span> + <span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span> <span class='op'>|=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span> <span class='kw'>end</span> <span class='kw'>true</span> <span class='kw'>end</span></pre> @@ -1475,14 +1471,14 @@ <pre class="lines"> +236 237 238 239 -240 -241</pre> +240</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 237</span> + <pre class="code"><span class="info file"># File 'lib/felflame/system_manager.rb', line 236</span> <span class='kw'>def</span> <span class='id identifier rubyid_trigger_when_removed'>trigger_when_removed</span><span class='lparen'>(</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rparen'>)</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_removal_triggers'>removal_triggers</span> <span class='op'>|=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span> @@ -1499,7 +1495,7 @@ </div> <div id="footer"> - Generated on Mon Jan 3 06:20:47 2022 by + Generated on Mon Jan 3 07:34:30 2022 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.26 (ruby-2.7.3). </div> diff --git a/docs/Felflame_.html b/docs/Felflame_.html index eda8518..ac59bac 100644 --- a/docs/Felflame_.html +++ b/docs/Felflame_.html @@ -117,7 +117,7 @@ </div> </dt> - <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>3.0.0</span><span class='tstring_end'>"</span></span></pre></dd> + <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>3.0.0</span><span class='tstring_end'>'</span></span></pre></dd> </dl> @@ -133,7 +133,7 @@ </div> <div id="footer"> - Generated on Mon Jan 3 06:20:47 2022 by + Generated on Mon Jan 3 07:34:30 2022 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.26 (ruby-2.7.3). </div> diff --git a/docs/_index.html b/docs/_index.html index a183a99..d3becf8 100644 --- a/docs/_index.html +++ b/docs/_index.html @@ -131,6 +131,21 @@ </ul> + <ul id="alpha_O" class="alpha"> + <li class="letter">O</li> + <ul> + + <li> + <span class='object_link'><a href="FelFlame/Order.html" title="FelFlame::Order (module)">Order</a></span> + + <small>(FelFlame)</small> + + </li> + + </ul> + </ul> + + <ul id="alpha_S" class="alpha"> <li class="letter">S</li> <ul> @@ -168,7 +183,7 @@ </div> <div id="footer"> - Generated on Mon Jan 3 06:20:46 2022 by + Generated on Mon Jan 3 07:34:30 2022 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.26 (ruby-2.7.3). </div> diff --git a/docs/class_list.html b/docs/class_list.html index 126406f..8275577 100644 --- a/docs/class_list.html +++ b/docs/class_list.html @@ -43,7 +43,7 @@ <ul id="full_list" class="class"> <li id="object_" class="odd"><div class="item" style="padding-left:30px"><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></div></li> -<li id='object_FelFlame' class='even'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">FelFlame</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_FelFlame::ComponentManager' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelFlame/ComponentManager.html" title="FelFlame::ComponentManager (class)">ComponentManager</a></span> < Object<small class='search_info'>FelFlame</small></div></li><li id='object_FelFlame::Components' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">Components</a></span><small class='search_info'>FelFlame</small></div></li><li id='object_FelFlame::Entities' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelFlame/Entities.html" title="FelFlame::Entities (class)">Entities</a></span> < Object<small class='search_info'>FelFlame</small></div></li><li id='object_FelFlame::Scenes' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelFlame/Scenes.html" title="FelFlame::Scenes (class)">Scenes</a></span> < Object<small class='search_info'>FelFlame</small></div></li><li id='object_FelFlame::Stage' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelFlame/Stage.html" title="FelFlame::Stage (module)">Stage</a></span><small class='search_info'>FelFlame</small></div></li><li id='object_FelFlame::Systems' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span> < Object<small class='search_info'>FelFlame</small></div></li></ul></li><li id='object_Felflame' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Felflame_.html" title="Felflame (module)">Felflame</a></span><small class='search_info'>Top Level Namespace</small></div></li> +<li id='object_FelFlame' class='even'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">FelFlame</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_FelFlame::ComponentManager' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelFlame/ComponentManager.html" title="FelFlame::ComponentManager (class)">ComponentManager</a></span> < Object<small class='search_info'>FelFlame</small></div></li><li id='object_FelFlame::Components' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">Components</a></span><small class='search_info'>FelFlame</small></div></li><li id='object_FelFlame::Entities' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelFlame/Entities.html" title="FelFlame::Entities (class)">Entities</a></span> < Object<small class='search_info'>FelFlame</small></div></li><li id='object_FelFlame::Order' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelFlame/Order.html" title="FelFlame::Order (module)">Order</a></span><small class='search_info'>FelFlame</small></div></li><li id='object_FelFlame::Scenes' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelFlame/Scenes.html" title="FelFlame::Scenes (class)">Scenes</a></span> < Object<small class='search_info'>FelFlame</small></div></li><li id='object_FelFlame::Stage' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelFlame/Stage.html" title="FelFlame::Stage (module)">Stage</a></span><small class='search_info'>FelFlame</small></div></li><li id='object_FelFlame::Systems' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span> < Object<small class='search_info'>FelFlame</small></div></li></ul></li><li id='object_Felflame' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Felflame_.html" title="Felflame (module)">Felflame</a></span><small class='search_info'>Top Level Namespace</small></div></li> </ul> </div> diff --git a/docs/file.README.html b/docs/file.README.html index 11b0848..8565de7 100644 --- a/docs/file.README.html +++ b/docs/file.README.html @@ -76,11 +76,11 @@ <ul> <li><a href="#what-is-felflame">What is FelFlame?</a></li> <li><a href="#what-is-ecs">What is ECS?</a> - - <a href="#components">Components</a> - - <a href="#entities">Entities</a> - - <a href="#systems">Systems</a> - - <a href="#scenes">Scenes</a> - - <a href="#stage">Stage</a></li> + * <a href="#components">Components</a> + * <a href="#entities">Entities</a> + * <a href="#systems">Systems</a> + * <a href="#scenes">Scenes</a> + * <a href="#stage">Stage</a></li> <li><a href="#usage">Usage</a> <ul> @@ -89,7 +89,6 @@ <ul> <li><a href="#creation">Creation</a></li> <li><a href="#accessing">Accessing</a></li> -<li><a href="#get-id">Get ID</a></li> <li><a href="#adding-and-removing-components">Adding and Removing Components</a></li> <li><a href="#accessing-entities-attached-components">Accessing Entities' Attached Components</a></li> <li><a href="#deletion">Deletion</a></li> @@ -99,10 +98,9 @@ <ul> <li><a href="#creating-a-component-manager">Creating a Component Manager</a></li> <li><a href="#creating-a-component-from-a-component-manager">Creating a Component from a Component Manager</a></li> -<li><a href="#accessing-and-getting-id">Accessing and Getting ID</a></li> +<li><a href="#accessing-1">Accessing</a></li> <li><a href="#accessing-attributes-and-changing-them">Accessing Attributes and Changing Them</a></li> <li><a href="#deleting-components">Deleting Components</a></li> -<li><a href="#iterating-over-components">Iterating over Components</a></li> <li><a href="#accessing-components-attached-entities">Accessing Components' attached Entities</a></li> </ul></li> <li><a href="#systems-1">Systems</a> @@ -118,7 +116,7 @@ <ul> <li><a href="#creation-2">Creation</a></li> -<li><a href="#accessing-1">Accessing</a></li> +<li><a href="#accessing-2">Accessing</a></li> <li><a href="#adding-systems">Adding Systems</a></li> <li><a href="#removing-systems">Removing Systems</a></li> <li><a href="#clearing">Clearing</a></li> @@ -185,11 +183,13 @@ ECS stands for Entity, Component, and System.</p> <hr> -<p>If all of this sounds very confusing, don't worry. A video tutorial series is in the works where I will build a game using this framework and explain every step of the way. You can also read some examples and explanations below.</p> - <h1 id="usage">Usage</h1> -<p>To use FelFlame simply install the gem using <code>gem install felflame</code> or using bundler <code>bundle add felflame</code> and then require it in your project like so: <code>require 'felflame'</code>. Working outside of the gem for rendering engines that do not support the usage of gems is a planned feature in the works.</p> +<p>There are 2 ways of using FelFlame. You can either <code>include</code> it as a gem in your project if your game engine supports this. The other option is to download the single file export of FelFlame and then <code>require_relative</code> this file in your project. The single file export takes all the ruby code in the various files and concatenates them into a single file so it is more portable and easy to add.</p> + +<p>To use the gem method you can do the following: install the gem using <code>gem install felflame</code> or using bundler <code>bundle add felflame</code> and then require it in your project like so: <code>require 'felflame'</code>.</p> + +<p>To use the single file export method you simply download the felflame.rb file from the <a href="https://github.com/realtradam/FelFlame/releases">releases page on Github</a> and add it to your source folder and add a <code>require relative 'felflame.rb'</code> line or wherever you have placed the file to use it.</p> <h2 id="entities">Entities</h2> @@ -200,29 +200,24 @@ ECS stands for Entity, Component, and System.</p> <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 (module)">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> +<p>or if we want to add (any number of)components to it when creating it:</p> <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 (module)">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 (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">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'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">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='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">Components</a></span></span><span class='op'>::</span><span class='const'>EnemyTeam</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</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> +<p>Oftentimes you will not be accessing an Entity this way. Later we will shows you a more common way of accessing entities. +If you need to you can access Entities using the <code>Entities</code> module:</p> <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 (module)">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 -entity where a new entity will claim that ID. To get the ID of an Entity:</p> - -<pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span> -</code></pre> +<span class='ivar'>@entity</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">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_first'>first</span> +<span class='ivar'>@entity</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">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_each'>each</span> <span class='comment'># you can iterate over all entities this way. Any valid array method can be used +</span></code></pre> <h3 id="adding-and-removing-components">Adding and Removing Components</h3> @@ -234,14 +229,18 @@ entity where a new entity will claim that ID. To get the ID of an Entity:</p> <h3 id="accessing-entities-attached-components">Accessing Entities' Attached Components</h3> +<p>This is the most common way of accessing an Entity</p> + <p>When Components are added to Entities, they can be accessed from the Entity. By using a Component Manager as a key we can access an array of all components created from that Component Manager that are attached to an entity:</p> -<pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span><span class='period'>.</span><span class='id identifier rubyid_components'>components</span><span class='lbracket'>[</span><span class='ivar'>@component_manager</span><span class='rbracket'>]</span> <span class='comment'># => [@component1, @component2, component3] +<pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span><span class='period'>.</span><span class='id identifier rubyid_components'>components</span><span class='lbracket'>[</span><span class='ivar'>@component_manager</span><span class='rbracket'>]</span> <span class='comment'># => [@component1, @component2, @component3] </span></code></pre> <h3 id="deletion">Deletion</h3> -<p>To have all Components from an Entity removed and the Entity deleted we do the following:</p> +<p>To have all Components from an Entity <strong>removed</strong> and the Entity deleted we do the following:</p> + +<p>NOTE: The components will <strong>not be deleted</strong>. They are simply <strong>removed</strong> from the entity and then the entity is destroyed. You must handle component deletion yourself as for example singleton components need to removed instead of deleted.</p> <pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> </code></pre> @@ -270,19 +269,18 @@ When defining attributes symbols should be used.</p> <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 (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">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> +<p>Or we can even override the defaults when creating the component:</p> <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 (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">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> +<h3 id="accessing">Accessing</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> +<p>You can access components using any array method.</p> <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 (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">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 class='ivar'>@component</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">Components</a></span></span><span class='op'>::</span><span class='const'>Stats</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span> +<span class='ivar'>@component</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">Components</a></span></span><span class='op'>::</span><span class='const'>Stats</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='comment'># you can use iterators this way </span></code></pre> <h3 id="accessing-attributes-and-changing-them">Accessing Attributes and Changing Them</h3> @@ -295,30 +293,26 @@ Here are the ways to edit attrubutes, followed by the ways to read them.</p> </code></pre> <pre class="code ruby"><code class="ruby"><span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_hp'>hp</span> <span class='comment'># => 95 -</span><span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_attrs'>attrs</span> <span class='comment'># => {armour: 'Leather', hp: 95} +</span><span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_to_h'>to_h</span> <span class='comment'># => {armour: 'Leather', hp: 95} </span></code></pre> <h3 id="deleting-components">Deleting Components</h3> -<p>Deleting a Component is the same format as deleting an Entity. When a Component is deleted referenced to it such as to entities are automatically cleared.</p> +<p>Deleting a Component is the same convention as deleting an Entity. When a Component is deleted referenced to it such as to entities are automatically cleared.</p> <pre class="code ruby"><code class="ruby"><span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> </code></pre> -<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'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">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> <p>Components also keep track of what Entities are using it. To access this list we do the following:</p> <pre class="code ruby"><code class="ruby"><span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_entities'>entities</span> <span class='comment'># => [@entity1, @entity2, @entity3] +</span> +<span class='comment'># get the first entity attached. +</span><span class='comment'># this will throw a warning if there is more or less then +</span><span class='comment'># exactly one entity +</span><span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_entity'>entity</span> <span class='comment'># => @entity </span></code></pre> <h2 id="systems">Systems</h2> @@ -339,7 +333,9 @@ Here are the ways to edit attrubutes, followed by the ways to read them.</p> <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> +E.g priority 1 will go first, priority 2 will go second, etcetera. </p> + +<p>Both Scenes and Systems have a priority. System priority will decide the order it will be called inside of a Scene, which the Scene priority will decide the order it will be called inside of the Stage.</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> @@ -437,7 +433,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera. </p> <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'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">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> +<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 (module)">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='comma'>,</span> <span class='label'>priority:</span> <span class='int'>5</span><span class='rparen'>)</span> </code></pre> <h3 id="accessing">Accessing</h3> @@ -451,14 +447,22 @@ E.g priority 1 will go first, priority 2 will go second, etcetera. </p> <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'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">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 (module)">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> +<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">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 (module)">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> +<p>Removing Systems works similarly:</p> -<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">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 (module)">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> +<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">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 (module)">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> @@ -481,7 +485,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera. </p> <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> +<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'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Stage.html" title="FelFlame::Stage (module)">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 (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'>Scene</span><span class='op'>::</span><span class='const'>ExampleScene</span> </code></pre> @@ -495,7 +499,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera. </p> <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> +<p>On each frame of the game generally we will want to execute the Stage once. When the Stage is executed it is progressing your game 1 frame forward. The Stage will call all Scenes you added to it in the order of their priority. Here is how we do it:</p> <pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Stage.html" title="FelFlame::Stage (module)">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> @@ -514,7 +518,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera. </p> </div></div> <div id="footer"> - Generated on Mon Jan 3 06:20:46 2022 by + Generated on Mon Jan 3 07:34:30 2022 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.26 (ruby-2.7.3). </div> diff --git a/docs/index.html b/docs/index.html index 5333a27..916cce2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -76,11 +76,11 @@ <ul> <li><a href="#what-is-felflame">What is FelFlame?</a></li> <li><a href="#what-is-ecs">What is ECS?</a> - - <a href="#components">Components</a> - - <a href="#entities">Entities</a> - - <a href="#systems">Systems</a> - - <a href="#scenes">Scenes</a> - - <a href="#stage">Stage</a></li> + * <a href="#components">Components</a> + * <a href="#entities">Entities</a> + * <a href="#systems">Systems</a> + * <a href="#scenes">Scenes</a> + * <a href="#stage">Stage</a></li> <li><a href="#usage">Usage</a> <ul> @@ -89,7 +89,6 @@ <ul> <li><a href="#creation">Creation</a></li> <li><a href="#accessing">Accessing</a></li> -<li><a href="#get-id">Get ID</a></li> <li><a href="#adding-and-removing-components">Adding and Removing Components</a></li> <li><a href="#accessing-entities-attached-components">Accessing Entities' Attached Components</a></li> <li><a href="#deletion">Deletion</a></li> @@ -99,10 +98,9 @@ <ul> <li><a href="#creating-a-component-manager">Creating a Component Manager</a></li> <li><a href="#creating-a-component-from-a-component-manager">Creating a Component from a Component Manager</a></li> -<li><a href="#accessing-and-getting-id">Accessing and Getting ID</a></li> +<li><a href="#accessing-1">Accessing</a></li> <li><a href="#accessing-attributes-and-changing-them">Accessing Attributes and Changing Them</a></li> <li><a href="#deleting-components">Deleting Components</a></li> -<li><a href="#iterating-over-components">Iterating over Components</a></li> <li><a href="#accessing-components-attached-entities">Accessing Components' attached Entities</a></li> </ul></li> <li><a href="#systems-1">Systems</a> @@ -118,7 +116,7 @@ <ul> <li><a href="#creation-2">Creation</a></li> -<li><a href="#accessing-1">Accessing</a></li> +<li><a href="#accessing-2">Accessing</a></li> <li><a href="#adding-systems">Adding Systems</a></li> <li><a href="#removing-systems">Removing Systems</a></li> <li><a href="#clearing">Clearing</a></li> @@ -185,11 +183,13 @@ ECS stands for Entity, Component, and System.</p> <hr> -<p>If all of this sounds very confusing, don't worry. A video tutorial series is in the works where I will build a game using this framework and explain every step of the way. You can also read some examples and explanations below.</p> - <h1 id="usage">Usage</h1> -<p>To use FelFlame simply install the gem using <code>gem install felflame</code> or using bundler <code>bundle add felflame</code> and then require it in your project like so: <code>require 'felflame'</code>. Working outside of the gem for rendering engines that do not support the usage of gems is a planned feature in the works.</p> +<p>There are 2 ways of using FelFlame. You can either <code>include</code> it as a gem in your project if your game engine supports this. The other option is to download the single file export of FelFlame and then <code>require_relative</code> this file in your project. The single file export takes all the ruby code in the various files and concatenates them into a single file so it is more portable and easy to add.</p> + +<p>To use the gem method you can do the following: install the gem using <code>gem install felflame</code> or using bundler <code>bundle add felflame</code> and then require it in your project like so: <code>require 'felflame'</code>.</p> + +<p>To use the single file export method you simply download the felflame.rb file from the <a href="https://github.com/realtradam/FelFlame/releases">releases page on Github</a> and add it to your source folder and add a <code>require relative 'felflame.rb'</code> line or wherever you have placed the file to use it.</p> <h2 id="entities">Entities</h2> @@ -200,29 +200,24 @@ ECS stands for Entity, Component, and System.</p> <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 (module)">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> +<p>or if we want to add (any number of)components to it when creating it:</p> <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 (module)">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 (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">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'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">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='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">Components</a></span></span><span class='op'>::</span><span class='const'>EnemyTeam</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</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> +<p>Oftentimes you will not be accessing an Entity this way. Later we will shows you a more common way of accessing entities. +If you need to you can access Entities using the <code>Entities</code> module:</p> <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 (module)">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 -entity where a new entity will claim that ID. To get the ID of an Entity:</p> - -<pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span> -</code></pre> +<span class='ivar'>@entity</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">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_first'>first</span> +<span class='ivar'>@entity</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">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_each'>each</span> <span class='comment'># you can iterate over all entities this way. Any valid array method can be used +</span></code></pre> <h3 id="adding-and-removing-components">Adding and Removing Components</h3> @@ -234,14 +229,18 @@ entity where a new entity will claim that ID. To get the ID of an Entity:</p> <h3 id="accessing-entities-attached-components">Accessing Entities' Attached Components</h3> +<p>This is the most common way of accessing an Entity</p> + <p>When Components are added to Entities, they can be accessed from the Entity. By using a Component Manager as a key we can access an array of all components created from that Component Manager that are attached to an entity:</p> -<pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span><span class='period'>.</span><span class='id identifier rubyid_components'>components</span><span class='lbracket'>[</span><span class='ivar'>@component_manager</span><span class='rbracket'>]</span> <span class='comment'># => [@component1, @component2, component3] +<pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span><span class='period'>.</span><span class='id identifier rubyid_components'>components</span><span class='lbracket'>[</span><span class='ivar'>@component_manager</span><span class='rbracket'>]</span> <span class='comment'># => [@component1, @component2, @component3] </span></code></pre> <h3 id="deletion">Deletion</h3> -<p>To have all Components from an Entity removed and the Entity deleted we do the following:</p> +<p>To have all Components from an Entity <strong>removed</strong> and the Entity deleted we do the following:</p> + +<p>NOTE: The components will <strong>not be deleted</strong>. They are simply <strong>removed</strong> from the entity and then the entity is destroyed. You must handle component deletion yourself as for example singleton components need to removed instead of deleted.</p> <pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> </code></pre> @@ -270,19 +269,18 @@ When defining attributes symbols should be used.</p> <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 (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">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> +<p>Or we can even override the defaults when creating the component:</p> <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 (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">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> +<h3 id="accessing">Accessing</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> +<p>You can access components using any array method.</p> <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 (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">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 class='ivar'>@component</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">Components</a></span></span><span class='op'>::</span><span class='const'>Stats</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span> +<span class='ivar'>@component</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">Components</a></span></span><span class='op'>::</span><span class='const'>Stats</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='comment'># you can use iterators this way </span></code></pre> <h3 id="accessing-attributes-and-changing-them">Accessing Attributes and Changing Them</h3> @@ -295,30 +293,26 @@ Here are the ways to edit attrubutes, followed by the ways to read them.</p> </code></pre> <pre class="code ruby"><code class="ruby"><span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_hp'>hp</span> <span class='comment'># => 95 -</span><span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_attrs'>attrs</span> <span class='comment'># => {armour: 'Leather', hp: 95} +</span><span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_to_h'>to_h</span> <span class='comment'># => {armour: 'Leather', hp: 95} </span></code></pre> <h3 id="deleting-components">Deleting Components</h3> -<p>Deleting a Component is the same format as deleting an Entity. When a Component is deleted referenced to it such as to entities are automatically cleared.</p> +<p>Deleting a Component is the same convention as deleting an Entity. When a Component is deleted referenced to it such as to entities are automatically cleared.</p> <pre class="code ruby"><code class="ruby"><span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> </code></pre> -<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'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">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> <p>Components also keep track of what Entities are using it. To access this list we do the following:</p> <pre class="code ruby"><code class="ruby"><span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_entities'>entities</span> <span class='comment'># => [@entity1, @entity2, @entity3] +</span> +<span class='comment'># get the first entity attached. +</span><span class='comment'># this will throw a warning if there is more or less then +</span><span class='comment'># exactly one entity +</span><span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_entity'>entity</span> <span class='comment'># => @entity </span></code></pre> <h2 id="systems">Systems</h2> @@ -339,7 +333,9 @@ Here are the ways to edit attrubutes, followed by the ways to read them.</p> <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> +E.g priority 1 will go first, priority 2 will go second, etcetera. </p> + +<p>Both Scenes and Systems have a priority. System priority will decide the order it will be called inside of a Scene, which the Scene priority will decide the order it will be called inside of the Stage.</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> @@ -437,7 +433,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera. </p> <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'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">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> +<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 (module)">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='comma'>,</span> <span class='label'>priority:</span> <span class='int'>5</span><span class='rparen'>)</span> </code></pre> <h3 id="accessing">Accessing</h3> @@ -451,14 +447,22 @@ E.g priority 1 will go first, priority 2 will go second, etcetera. </p> <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'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">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 (module)">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> +<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">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 (module)">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> +<p>Removing Systems works similarly:</p> -<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">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 (module)">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> +<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">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 (module)">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> @@ -481,7 +485,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera. </p> <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> +<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'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Stage.html" title="FelFlame::Stage (module)">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 (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'>Scene</span><span class='op'>::</span><span class='const'>ExampleScene</span> </code></pre> @@ -495,7 +499,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera. </p> <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> +<p>On each frame of the game generally we will want to execute the Stage once. When the Stage is executed it is progressing your game 1 frame forward. The Stage will call all Scenes you added to it in the order of their priority. Here is how we do it:</p> <pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Stage.html" title="FelFlame::Stage (module)">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> @@ -514,7 +518,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera. </p> </div></div> <div id="footer"> - Generated on Mon Jan 3 06:20:46 2022 by + Generated on Mon Jan 3 07:34:30 2022 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.26 (ruby-2.7.3). </div> diff --git a/docs/method_list.html b/docs/method_list.html index d8253e9..e0c8da1 100644 --- a/docs/method_list.html +++ b/docs/method_list.html @@ -94,21 +94,13 @@ <li class="odd "> <div class="item"> - <span class='object_link'><a href="FelFlame/ComponentManager.html#attr_changed_trigger_systems-instance_method" title="FelFlame::ComponentManager#attr_changed_trigger_systems (method)">#attr_changed_trigger_systems</a></span> - <small>FelFlame::ComponentManager</small> - </div> - </li> - - - <li class="even "> - <div class="item"> <span class='object_link'><a href="FelFlame/Systems.html#attr_triggers-instance_method" title="FelFlame::Systems#attr_triggers (method)">#attr_triggers</a></span> <small>FelFlame::Systems</small> </div> </li> - <li class="odd "> + <li class="even "> <div class="item"> <span class='object_link'><a href="FelFlame/ComponentManager.html#attr_triggers-instance_method" title="FelFlame::ComponentManager#attr_triggers (method)">#attr_triggers</a></span> <small>FelFlame::ComponentManager</small> @@ -116,7 +108,7 @@ </li> - <li class="even "> + <li class="odd "> <div class="item"> <span class='object_link'><a href="FelFlame/ComponentManager.html#attr_triggers-class_method" title="FelFlame::ComponentManager.attr_triggers (method)">attr_triggers</a></span> <small>FelFlame::ComponentManager</small> @@ -124,7 +116,7 @@ </li> - <li class="odd "> + <li class="even "> <div class="item"> <span class='object_link'><a href="FelFlame.html#call-class_method" title="FelFlame.call (method)">call</a></span> <small>FelFlame</small> @@ -132,7 +124,7 @@ </li> - <li class="even "> + <li class="odd "> <div class="item"> <span class='object_link'><a href="FelFlame/Scenes.html#call-instance_method" title="FelFlame::Scenes#call (method)">#call</a></span> <small>FelFlame::Scenes</small> @@ -140,7 +132,7 @@ </li> - <li class="odd "> + <li class="even "> <div class="item"> <span class='object_link'><a href="FelFlame/Stage.html#call-class_method" title="FelFlame::Stage.call (method)">call</a></span> <small>FelFlame::Stage</small> @@ -148,7 +140,7 @@ </li> - <li class="even "> + <li class="odd "> <div class="item"> <span class='object_link'><a href="FelFlame/Systems.html#call-instance_method" title="FelFlame::Systems#call (method)">#call</a></span> <small>FelFlame::Systems</small> @@ -156,7 +148,7 @@ </li> - <li class="odd "> + <li class="even "> <div class="item"> <span class='object_link'><a href="FelFlame/Scenes.html#clear-instance_method" title="FelFlame::Scenes#clear (method)">#clear</a></span> <small>FelFlame::Scenes</small> @@ -164,7 +156,7 @@ </li> - <li class="even "> + <li class="odd "> <div class="item"> <span class='object_link'><a href="FelFlame/Stage.html#clear-class_method" title="FelFlame::Stage.clear (method)">clear</a></span> <small>FelFlame::Stage</small> @@ -172,7 +164,7 @@ </li> - <li class="odd "> + <li class="even "> <div class="item"> <span class='object_link'><a href="FelFlame/Systems.html#clear_triggers-instance_method" title="FelFlame::Systems#clear_triggers (method)">#clear_triggers</a></span> <small>FelFlame::Systems</small> @@ -180,7 +172,7 @@ </li> - <li class="even "> + <li class="odd "> <div class="item"> <span class='object_link'><a href="FelFlame/Entities.html#component-instance_method" title="FelFlame::Entities#component (method)">#component</a></span> <small>FelFlame::Entities</small> @@ -188,7 +180,7 @@ </li> - <li class="odd "> + <li class="even "> <div class="item"> <span class='object_link'><a href="FelFlame/Entities.html#components-instance_method" title="FelFlame::Entities#components (method)">#components</a></span> <small>FelFlame::Entities</small> @@ -196,7 +188,7 @@ </li> - <li class="even "> + <li class="odd "> <div class="item"> <span class='object_link'><a href="FelFlame/Systems.html#const_cache-class_method" title="FelFlame::Systems.const_cache (method)">const_cache</a></span> <small>FelFlame::Systems</small> @@ -204,7 +196,7 @@ </li> - <li class="odd "> + <li class="even "> <div class="item"> <span class='object_link'><a href="FelFlame/Entities.html#delete-instance_method" title="FelFlame::Entities#delete (method)">#delete</a></span> <small>FelFlame::Entities</small> @@ -212,7 +204,7 @@ </li> - <li class="even "> + <li class="odd "> <div class="item"> <span class='object_link'><a href="FelFlame/ComponentManager.html#delete-instance_method" title="FelFlame::ComponentManager#delete (method)">#delete</a></span> <small>FelFlame::ComponentManager</small> @@ -220,7 +212,7 @@ </li> - <li class="odd "> + <li class="even "> <div class="item"> <span class='object_link'><a href="FelFlame/ComponentManager.html#entities-instance_method" title="FelFlame::ComponentManager#entities (method)">#entities</a></span> <small>FelFlame::ComponentManager</small> @@ -228,7 +220,7 @@ </li> - <li class="even "> + <li class="odd "> <div class="item"> <span class='object_link'><a href="FelFlame/ComponentManager.html#entity-instance_method" title="FelFlame::ComponentManager#entity (method)">#entity</a></span> <small>FelFlame::ComponentManager</small> @@ -236,7 +228,7 @@ </li> - <li class="odd "> + <li class="even "> <div class="item"> <span class='object_link'><a href="FelFlame/Scenes.html#initialize-instance_method" title="FelFlame::Scenes#initialize (method)">#initialize</a></span> <small>FelFlame::Scenes</small> @@ -244,7 +236,7 @@ </li> - <li class="even "> + <li class="odd "> <div class="item"> <span class='object_link'><a href="FelFlame/Entities.html#initialize-instance_method" title="FelFlame::Entities#initialize (method)">#initialize</a></span> <small>FelFlame::Entities</small> @@ -252,7 +244,7 @@ </li> - <li class="odd "> + <li class="even "> <div class="item"> <span class='object_link'><a href="FelFlame/Systems.html#initialize-instance_method" title="FelFlame::Systems#initialize (method)">#initialize</a></span> <small>FelFlame::Systems</small> @@ -260,7 +252,7 @@ </li> - <li class="even "> + <li class="odd "> <div class="item"> <span class='object_link'><a href="FelFlame/ComponentManager.html#initialize-instance_method" title="FelFlame::ComponentManager#initialize (method)">#initialize</a></span> <small>FelFlame::ComponentManager</small> @@ -268,7 +260,7 @@ </li> - <li class="odd "> + <li class="even "> <div class="item"> <span class='object_link'><a href="FelFlame/Components.html#new-class_method" title="FelFlame::Components.new (method)">new</a></span> <small>FelFlame::Components</small> @@ -276,7 +268,7 @@ </li> - <li class="even "> + <li class="odd "> <div class="item"> <span class='object_link'><a href="FelFlame/Scenes.html#priority-instance_method" title="FelFlame::Scenes#priority (method)">#priority</a></span> <small>FelFlame::Scenes</small> @@ -284,7 +276,7 @@ </li> - <li class="odd "> + <li class="even "> <div class="item"> <span class='object_link'><a href="FelFlame/Systems.html#priority-instance_method" title="FelFlame::Systems#priority (method)">#priority</a></span> <small>FelFlame::Systems</small> @@ -292,7 +284,7 @@ </li> - <li class="even "> + <li class="odd "> <div class="item"> <span class='object_link'><a href="FelFlame/Systems.html#redefine-instance_method" title="FelFlame::Systems#redefine (method)">#redefine</a></span> <small>FelFlame::Systems</small> @@ -300,7 +292,7 @@ </li> - <li class="odd "> + <li class="even "> <div class="item"> <span class='object_link'><a href="FelFlame/Systems.html#removal_triggers-instance_method" title="FelFlame::Systems#removal_triggers (method)">#removal_triggers</a></span> <small>FelFlame::Systems</small> @@ -308,7 +300,7 @@ </li> - <li class="even "> + <li class="odd "> <div class="item"> <span class='object_link'><a href="FelFlame/ComponentManager.html#removal_triggers-instance_method" title="FelFlame::ComponentManager#removal_triggers (method)">#removal_triggers</a></span> <small>FelFlame::ComponentManager</small> @@ -316,7 +308,7 @@ </li> - <li class="odd "> + <li class="even "> <div class="item"> <span class='object_link'><a href="FelFlame/ComponentManager.html#removal_triggers-class_method" title="FelFlame::ComponentManager.removal_triggers (method)">removal_triggers</a></span> <small>FelFlame::ComponentManager</small> @@ -324,7 +316,7 @@ </li> - <li class="even "> + <li class="odd "> <div class="item"> <span class='object_link'><a href="FelFlame/Scenes.html#remove-instance_method" title="FelFlame::Scenes#remove (method)">#remove</a></span> <small>FelFlame::Scenes</small> @@ -332,7 +324,7 @@ </li> - <li class="odd "> + <li class="even "> <div class="item"> <span class='object_link'><a href="FelFlame/Stage.html#remove-class_method" title="FelFlame::Stage.remove (method)">remove</a></span> <small>FelFlame::Stage</small> @@ -340,7 +332,7 @@ </li> - <li class="even "> + <li class="odd "> <div class="item"> <span class='object_link'><a href="FelFlame/Entities.html#remove-instance_method" title="FelFlame::Entities#remove (method)">#remove</a></span> <small>FelFlame::Entities</small> @@ -348,7 +340,7 @@ </li> - <li class="odd "> + <li class="even "> <div class="item"> <span class='object_link'><a href="FelFlame/Stage.html#scenes-class_method" title="FelFlame::Stage.scenes (method)">scenes</a></span> <small>FelFlame::Stage</small> @@ -356,7 +348,7 @@ </li> - <li class="even "> + <li class="odd "> <div class="item"> <span class='object_link'><a href="FelFlame/Systems.html#scenes-instance_method" title="FelFlame::Systems#scenes (method)">#scenes</a></span> <small>FelFlame::Systems</small> @@ -364,6 +356,14 @@ </li> + <li class="even "> + <div class="item"> + <span class='object_link'><a href="FelFlame/Order.html#sort-instance_method" title="FelFlame::Order#sort (method)">#sort</a></span> + <small>FelFlame::Order</small> + </div> + </li> + + <li class="odd "> <div class="item"> <span class='object_link'><a href="FelFlame/Scenes.html#systems-instance_method" title="FelFlame::Scenes#systems (method)">#systems</a></span> diff --git a/docs/top-level-namespace.html b/docs/top-level-namespace.html index 9462bb1..78ec112 100644 --- a/docs/top-level-namespace.html +++ b/docs/top-level-namespace.html @@ -127,7 +127,7 @@ </div> <div id="footer"> - Generated on Mon Jan 3 06:20:47 2022 by + Generated on Mon Jan 3 07:34:30 2022 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.26 (ruby-2.7.3). </div> |
