summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2022-01-28 16:41:23 -0500
committerrealtradam <[email protected]>2022-01-28 16:41:23 -0500
commitbf6769c6b1658c5f6a7b02fc8fc0400fc4f61dec (patch)
tree774e8174ead6b7d726a3b5342fe457faebaa3449
parenteb84d916fb2b14db386d9f1f69fe0f310a5f1d8a (diff)
downloadFelECS-bf6769c6b1658c5f6a7b02fc8fc0400fc4f61dec.tar.gz
FelECS-bf6769c6b1658c5f6a7b02fc8fc0400fc4f61dec.zip
fix order of attr triggers
-rw-r--r--docs/FelECS.html335
-rw-r--r--docs/FelECS/ComponentManager.html1239
-rw-r--r--docs/FelECS/Components.html337
-rw-r--r--docs/FelECS/Entities.html792
-rw-r--r--docs/FelECS/Order.html251
-rw-r--r--docs/FelECS/Scenes.html765
-rw-r--r--docs/FelECS/Stage.html572
-rw-r--r--docs/FelECS/Systems.html1505
-rw-r--r--docs/_index.html96
-rw-r--r--docs/class_list.html2
-rw-r--r--docs/file.README.html532
-rw-r--r--docs/index.html532
-rw-r--r--docs/method_list.html368
-rw-r--r--docs/top-level-namespace.html39
-rw-r--r--lib/felecs/component_manager.rb6
-rw-r--r--mrbgem/mrblib/felecs.rb6
16 files changed, 6704 insertions, 673 deletions
diff --git a/docs/FelECS.html b/docs/FelECS.html
new file mode 100644
index 0000000..d2d03b4
--- /dev/null
+++ b/docs/FelECS.html
@@ -0,0 +1,335 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>
+ Module: FelECS
+
+ &mdash; 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 = "FelECS";
+ 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 (F)</a> &raquo;
+
+
+ <span class="title">FelECS</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: FelECS
+
+
+
+</h1>
+<div class="box_info">
+
+
+
+
+
+
+
+
+
+
+
+ <dl>
+ <dt>Defined in:</dt>
+ <dd>lib/felecs.rb<span class="defines">,<br />
+ lib/felecs/order.rb,<br /> lib/felecs/version.rb,<br /> lib/felecs/scene_manager.rb,<br /> lib/felecs/stage_manager.rb,<br /> lib/felecs/entity_manager.rb,<br /> lib/felecs/system_manager.rb,<br /> lib/felecs/component_manager.rb</span>
+</dd>
+ </dl>
+
+</div>
+
+<h2>Overview</h2><div class="docstring">
+ <div class="discussion">
+
+<p>:nocov: Keeps the version of the Gem</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div><h2>Defined Under Namespace</h2>
+<p class="children">
+
+
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="FelECS/Components.html" title="FelECS::Components (module)">Components</a></span>, <span class='object_link'><a href="FelECS/Order.html" title="FelECS::Order (module)">Order</a></span>, <span class='object_link'><a href="FelECS/Stage.html" title="FelECS::Stage (module)">Stage</a></span>
+
+
+
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="FelECS/ComponentManager.html" title="FelECS::ComponentManager (class)">ComponentManager</a></span>, <span class='object_link'><a href="FelECS/Entities.html" title="FelECS::Entities (class)">Entities</a></span>, <span class='object_link'><a href="FelECS/Scenes.html" title="FelECS::Scenes (class)">Scenes</a></span>, <span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span>
+
+
+</p>
+
+
+ <h2>
+ Constant Summary
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
+ </h2>
+
+ <dl class="constants">
+
+ <dt id="Ent-constant" class="">Ent =
+ <div class="docstring">
+ <div class="discussion">
+
+<p>An alias for <span class='object_link'><a href="FelECS/Entities.html" title="FelECS::Entities (class)">Entities</a></span></p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div>
+ </dt>
+ <dd><pre class="code"><span class='const'>FelECS</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Entities.html" title="FelECS::Entities (class)">Entities</a></span></span></pre></dd>
+
+ <dt id="Cmp-constant" class="">Cmp =
+ <div class="docstring">
+ <div class="discussion">
+
+<p>An alias for <span class='object_link'><a href="FelECS/Components.html" title="FelECS::Components (module)">Components</a></span></p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div>
+ </dt>
+ <dd><pre class="code"><span class='const'>FelECS</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::Components (module)">Components</a></span></span></pre></dd>
+
+ <dt id="Sys-constant" class="">Sys =
+ <div class="docstring">
+ <div class="discussion">
+
+<p>An alias for <span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div>
+ </dt>
+ <dd><pre class="code"><span class='const'>FelECS</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span></pre></dd>
+
+ <dt id="Scn-constant" class="">Scn =
+ <div class="docstring">
+ <div class="discussion">
+
+<p>An alias for <span class='object_link'><a href="FelECS/Scenes.html" title="FelECS::Scenes (class)">Scenes</a></span></p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div>
+ </dt>
+ <dd><pre class="code"><span class='const'>FelECS</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Scenes.html" title="FelECS::Scenes (class)">Scenes</a></span></span></pre></dd>
+
+ <dt id="Stg-constant" class="">Stg =
+ <div class="docstring">
+ <div class="discussion">
+
+<p>An alias for <span class='object_link'><a href="FelECS/Stage.html" title="FelECS::Stage (module)">Stage</a></span></p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div>
+ </dt>
+ <dd><pre class="code"><span class='const'>FelECS</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Stage.html" title="FelECS::Stage (module)">Stage</a></span></span></pre></dd>
+
+ <dt id="Odr-constant" class="">Odr =
+ <div class="docstring">
+ <div class="discussion">
+ <dl class="rdoc-list note-list"><dt>An alias for {FelECS
+<dd></dd></dl>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div>
+ </dt>
+ <dd><pre class="code"><span class='const'>FelECS</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Order.html" title="FelECS::Order (module)">Order</a></span></span></pre></dd>
+
+ <dt id="VERSION-constant" class="">VERSION =
+ <div class="docstring">
+ <div class="discussion">
+
+<p>The version of the Gem</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div>
+ </dt>
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>5.0.0</span><span class='tstring_end'>&#39;</span></span></pre></dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+ <h2>
+ Class Method Summary
+ <small><a href="#" class="summary_toggle">collapse</a></small>
+ </h2>
+
+ <ul class="summary">
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#call-class_method" title="call (class method)">.<strong>call</strong> &#x21d2; Object </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>An alias for <span class='object_link'><a href="FelECS/Stage.html#call-class_method" title="FelECS::Stage.call (method)">Stage.call</a></span>.</p>
+</div></span>
+
+</li>
+
+
+ </ul>
+
+
+
+
+ <div id="class_method_details" class="method_details_list">
+ <h2>Class Method Details</h2>
+
+
+ <div class="method_details first">
+ <h3 class="signature first" id="call-class_method">
+
+ .<strong>call</strong> &#x21d2; <tt>Object</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>An alias for <span class='object_link'><a href="FelECS/Stage.html#call-class_method" title="FelECS::Stage.call (method)">FelECS::Stage.call</a></span>. It executes a single frame in the game.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+18
+19
+20</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs.rb', line 18</span>
+
+<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span>
+ <span class='const'><span class='object_link'><a href="" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Stage.html" title="FelECS::Stage (module)">Stage</a></span></span><span class='period'>.</span><span class='id identifier rubyid_call'><span class='object_link'><a href="FelECS/Stage.html#call-class_method" title="FelECS::Stage.call (method)">call</a></span></span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+</div>
+
+ <div id="footer">
+ Generated on Fri Jan 28 16:21:20 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/FelECS/ComponentManager.html b/docs/FelECS/ComponentManager.html
new file mode 100644
index 0000000..de5d5c3
--- /dev/null
+++ b/docs/FelECS/ComponentManager.html
@@ -0,0 +1,1239 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>
+ Class: FelECS::ComponentManager
+
+ &mdash; 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 = "FelECS::ComponentManager";
+ 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 (C)</a> &raquo;
+ <span class='title'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span>
+ &raquo;
+ <span class="title">ComponentManager</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>Class: FelECS::ComponentManager
+
+
+
+</h1>
+<div class="box_info">
+
+ <dl>
+ <dt>Inherits:</dt>
+ <dd>
+ <span class="inheritName">Object</span>
+
+ <ul class="fullTree">
+ <li>Object</li>
+
+ <li class="next">FelECS::ComponentManager</li>
+
+ </ul>
+ <a href="#" class="inheritanceTree">show all</a>
+
+ </dd>
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+ <dl>
+ <dt>Defined in:</dt>
+ <dd>lib/felecs/component_manager.rb</dd>
+ </dl>
+
+</div>
+
+<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 <span class='object_link'><a href="#to_h-instance_method" title="FelECS::ComponentManager#to_h (method)">#to_h</a></span> and <span class='object_link'><a href="#update_attrs-instance_method" title="FelECS::ComponentManager#update_attrs (method)">#update_attrs</a></span> methods instead.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div>
+
+
+
+ <h2>Class Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
+ <ul class="summary">
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#addition_triggers-class_method" title="addition_triggers (class method)">.<strong>addition_triggers</strong> &#x21d2; Array&lt;System&gt; </a>
+
+
+
+ </span>
+
+
+
+
+ <span class="note title readonly">readonly</span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Stores references to systems that should be triggered when this component is added to an enitity.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#attr_triggers-class_method" title="attr_triggers (class method)">.<strong>attr_triggers</strong> &#x21d2; Hash&lt;Symbol, System&gt; </a>
+
+
+
+ </span>
+
+
+
+
+ <span class="note title readonly">readonly</span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Stores references to systems that should be triggered when an attribute from this component changed.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#removal_triggers-class_method" title="removal_triggers (class method)">.<strong>removal_triggers</strong> &#x21d2; Array&lt;System&gt; </a>
+
+
+
+ </span>
+
+
+
+
+ <span class="note title readonly">readonly</span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Stores references to systems that should be triggered when this component is removed from an enitity.</p>
+</div></span>
+
+</li>
+
+
+ </ul>
+
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
+ <ul class="summary">
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#addition_triggers-instance_method" title="#addition_triggers (instance method)">#<strong>addition_triggers</strong> &#x21d2; Array&lt;System&gt; </a>
+
+
+
+ </span>
+
+
+
+
+ <span class="note title readonly">readonly</span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Stores references to systems that should be triggered when a component from this manager is added.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#attr_triggers-instance_method" title="#attr_triggers (instance method)">#<strong>attr_triggers</strong> &#x21d2; Hash&lt;Symbol, Array&lt;System&gt;&gt; </a>
+
+
+
+ </span>
+
+
+
+
+ <span class="note title readonly">readonly</span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Stores references to systems that should be triggered when an attribute from this manager is changed.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#removal_triggers-instance_method" title="#removal_triggers (instance method)">#<strong>removal_triggers</strong> &#x21d2; Array&lt;System&gt; </a>
+
+
+
+ </span>
+
+
+
+
+ <span class="note title readonly">readonly</span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Stores references to systems that should be triggered when a component from this manager is removed.</p>
+</div></span>
+
+</li>
+
+
+ </ul>
+
+
+
+
+
+ <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="#delete-instance_method" title="#delete (instance method)">#<strong>delete</strong> &#x21d2; Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Removes this component from the list and purges all references to this Component from other Entities, as well as its data.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#entities-instance_method" title="#entities (instance method)">#<strong>entities</strong> &#x21d2; Array&lt;Component&gt; </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Entities that have this component.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#entity-instance_method" title="#entity (instance method)">#<strong>entity</strong> &#x21d2; Component </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>A single entity.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(**attrs) &#x21d2; Component </a>
+
+
+
+ </span>
+
+
+ <span class="note title constructor">constructor</span>
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Creates a new component and sets the values of the attributes given to it.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#to_h-instance_method" title="#to_h (instance method)">#<strong>to_h</strong> &#x21d2; Hash&lt;Symbol, Value&gt; </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>A hash, where all the keys are attributes storing their respective values.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#update_attrs-instance_method" title="#update_attrs (instance method)">#<strong>update_attrs</strong>(**opts) &#x21d2; Hash&lt;Symbol, Value&gt; </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Update attribute values using a hash or keywords.</p>
+</div></span>
+
+</li>
+
+
+ </ul>
+
+
+<div id="constructor_details" class="method_details_list">
+ <h2>Constructor Details</h2>
+
+ <div class="method_details first">
+ <h3 class="signature first" id="initialize-instance_method">
+
+ #<strong>initialize</strong>(**attrs) &#x21d2; <tt>Component</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Creates a new component and sets the values of the attributes given to it. If an attritbute is not passed then it will remain as the default.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>attrs</span>
+
+
+ <span class='type'>(<tt>Keyword: Value</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p>You can pass any number of Keyword-Value pairs</p>
+</div>
+
+ </li>
+
+</ul>
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/component_manager.rb', line 134</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
+</span> <span class='comment'># (this is a function created with metaprogramming
+</span> <span class='comment'># in FelECS::Components)
+</span> <span class='id identifier rubyid_set_defaults'>set_defaults</span>
+
+ <span class='comment'># Fill params
+</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_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
+ <span class='id identifier rubyid_send'>send</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span>
+ <span class='kw'>end</span>
+
+ <span class='comment'># Save Component
+</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_push'>push</span> <span class='kw'>self</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+</div>
+
+ <div id="class_attr_details" class="attr_details">
+ <h2>Class Attribute Details</h2>
+
+
+ <span id="addition_triggers=-class_method"></span>
+ <div class="method_details first">
+ <h3 class="signature first" id="addition_triggers-class_method">
+
+ .<strong>addition_triggers</strong> &#x21d2; <tt>Array&lt;System&gt;</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Stores references to systems that should be triggered when this component is added to an enitity. Do not edit this array as it is managed by FelECS automatically.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Array&lt;System&gt;</tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+182
+183
+184</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/component_manager.rb', line 182</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>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+
+ <span id="attr_triggers=-class_method"></span>
+ <div class="method_details ">
+ <h3 class="signature " id="attr_triggers-class_method">
+
+ .<strong>attr_triggers</strong> &#x21d2; <tt>Hash&lt;Symbol, System&gt;</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Stores references to systems that should be triggered when an attribute from this component changed. Do not edit this hash as it is managed by FelECS automatically.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Hash&lt;Symbol, System&gt;</tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+198
+199
+200</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/component_manager.rb', line 198</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>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+
+ <span id="removal_triggers=-class_method"></span>
+ <div class="method_details ">
+ <h3 class="signature " id="removal_triggers-class_method">
+
+ .<strong>removal_triggers</strong> &#x21d2; <tt>Array&lt;System&gt;</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Stores references to systems that should be triggered when this component is removed from an enitity. Do not edit this array as it is managed by FelECS automatically.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Array&lt;System&gt;</tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+190
+191
+192</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/component_manager.rb', line 190</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>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+ <div id="instance_attr_details" class="attr_details">
+ <h2>Instance Attribute Details</h2>
+
+
+ <span id="addition_triggers=-instance_method"></span>
+ <div class="method_details first">
+ <h3 class="signature first" id="addition_triggers-instance_method">
+
+ #<strong>addition_triggers</strong> &#x21d2; <tt>Array&lt;System&gt;</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Stores references to systems that should be triggered when a component from this manager is added. Do not edit this array as it is managed by FelECS automatically.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Array&lt;System&gt;</tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+111
+112
+113</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/component_manager.rb', line 111</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>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+
+ <span id="attr_triggers=-instance_method"></span>
+ <div class="method_details ">
+ <h3 class="signature " id="attr_triggers-instance_method">
+
+ #<strong>attr_triggers</strong> &#x21d2; <tt>Hash&lt;Symbol, Array&lt;System&gt;&gt;</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Stores references to systems that should be triggered when an attribute from this manager is changed. Do not edit this hash as it is managed by FelECS automatically.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Hash&lt;Symbol, Array&lt;System&gt;&gt;</tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+127
+128
+129</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/component_manager.rb', line 127</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>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+
+ <span id="removal_triggers=-instance_method"></span>
+ <div class="method_details ">
+ <h3 class="signature " id="removal_triggers-instance_method">
+
+ #<strong>removal_triggers</strong> &#x21d2; <tt>Array&lt;System&gt;</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Stores references to systems that should be triggered when a component from this manager is removed. Do not edit this array as it is managed by FelECS automatically.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Array&lt;System&gt;</tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+119
+120
+121</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/component_manager.rb', line 119</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>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+
+ <div id="instance_method_details" class="method_details_list">
+ <h2>Instance Method Details</h2>
+
+
+ <div class="method_details first">
+ <h3 class="signature first" id="delete-instance_method">
+
+ #<strong>delete</strong> &#x21d2; <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Removes this component from the list and purges all references to this Component from other Entities, as well as its data.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p><code>true</code>.</p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/component_manager.rb', line 249</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>
+ <span class='id identifier rubyid_system'>system</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span> <span class='label'>component_or_manager:</span> <span class='kw'>self</span>
+ <span class='kw'>end</span>
+ <span class='id identifier rubyid_entities'>entities</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_entity'>entity</span><span class='op'>|</span>
+ <span class='id identifier rubyid_entity'>entity</span><span class='period'>.</span><span class='id identifier rubyid_remove'>remove</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_class'>class</span><span class='period'>.</span><span class='id identifier rubyid__data'>_data</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='kw'>self</span>
+ <span class='id identifier rubyid_instance_variables'>instance_variables</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_var'>var</span><span class='op'>|</span>
+ <span class='id identifier rubyid_instance_variable_set'>instance_variable_set</span><span class='lparen'>(</span><span class='id identifier rubyid_var'>var</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
+ <span class='kw'>end</span>
+ <span class='kw'>true</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="entities-instance_method">
+
+ #<strong>entities</strong> &#x21d2; <tt>Array&lt;Component&gt;</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Entities that have this component</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Array&lt;Component&gt;</tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+211
+212
+213</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/component_manager.rb', line 211</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>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="entity-instance_method">
+
+ #<strong>entity</strong> &#x21d2; <tt>Component</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>A single entity. Use this if you expect the component to only belong to one entity and you want to access it.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Component</tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+217
+218
+219
+220
+221
+222
+223
+224</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/component_manager.rb', line 217</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>
+ <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'>&quot;</span><span class='tstring_content'>This component belongs to NO entities but you called the method that is intended for components belonging to a single entity.\nYou may have a bug in your logic.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_entities'>entities</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>&gt;</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'>&quot;</span><span class='tstring_content'>This component belongs to MANY entities but you called the method that is intended for components belonging to a single entity.\nYou may have a bug in your logic.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
+ <span class='kw'>end</span>
+ <span class='id identifier rubyid_entities'>entities</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="to_h-instance_method">
+
+ #<strong>to_h</strong> &#x21d2; <tt>Hash&lt;Symbol, Value&gt;</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Returns A hash, where all the keys are attributes storing their respective values.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Hash&lt;Symbol, Value&gt;</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p>A hash, where all the keys are attributes storing their respective values.</p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+264
+265
+266
+267
+268
+269
+270</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/component_manager.rb', line 264</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>
+ <span class='id identifier rubyid_final'>final</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_delete_prefix'>delete_prefix</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>@</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_instance_variable_get'>instance_variable_get</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
+ <span class='kw'>end</span>
+ <span class='id identifier rubyid_return_hash'>return_hash</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:attr_triggers</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_return_hash'>return_hash</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="update_attrs-instance_method">
+
+ #<strong>update_attrs</strong>(**opts) &#x21d2; <tt>Hash&lt;Symbol, Value&gt;</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Update attribute values using a hash or keywords.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Hash&lt;Symbol, Value&gt;</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p>Hash of updated attributes</p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+228
+229
+230
+231
+232</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/component_manager.rb', line 228</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>
+ <span class='id identifier rubyid_send'>send</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span>
+ <span class='kw'>end</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+</div>
+
+ <div id="footer">
+ Generated on Fri Jan 28 16:21:21 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/FelECS/Components.html b/docs/FelECS/Components.html
new file mode 100644
index 0000000..a1b7abc
--- /dev/null
+++ b/docs/FelECS/Components.html
@@ -0,0 +1,337 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>
+ Module: FelECS::Components
+
+ &mdash; 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 = "FelECS::Components";
+ 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 (C)</a> &raquo;
+ <span class='title'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span>
+ &raquo;
+ <span class="title">Components</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: FelECS::Components
+
+
+
+</h1>
+<div class="box_info">
+
+
+
+
+
+
+
+
+
+
+
+ <dl>
+ <dt>Defined in:</dt>
+ <dd>lib/felecs.rb<span class="defines">,<br />
+ lib/felecs/component_manager.rb</span>
+</dd>
+ </dl>
+
+</div>
+
+<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="FelECS::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="FelECS::ComponentManager (class)">ComponentManager</a></span> documentation.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div>
+
+
+
+
+
+
+
+ <h2>
+ Class Method Summary
+ <small><a href="#" class="summary_toggle">collapse</a></small>
+ </h2>
+
+ <ul class="summary">
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#new-class_method" title="new (class method)">.<strong>new</strong>(component_name, *attrs, **attrs_with_defaults) &#x21d2; ComponentManager </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Creates a new <span class='object_link'><a href="ComponentManager.html" title="FelECS::ComponentManager (class)">component manager</a></span>.</p>
+</div></span>
+
+</li>
+
+
+ </ul>
+
+
+
+
+ <div id="class_method_details" class="method_details_list">
+ <h2>Class Method Details</h2>
+
+
+ <div class="method_details first">
+ <h3 class="signature first" id="new-class_method">
+
+ .<strong>new</strong>(component_name, *attrs, **attrs_with_defaults) &#x21d2; <tt><span class='object_link'><a href="ComponentManager.html" title="FelECS::ComponentManager (class)">ComponentManager</a></span></tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Creates a new <span class='object_link'><a href="ComponentManager.html" title="FelECS::ComponentManager (class)">component manager</a></span>.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+ <div class="examples">
+ <p class="tag_title">Examples:</p>
+
+
+ <pre class="example code"><code><span class='comment'># Here color is set to default to red
+</span><span class='comment'># while max and current are nil until set.
+</span><span class='comment'># When you make a new component using this component manager
+</span><span class='comment'># these are the values and accessors it will have.
+</span><span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'>Component</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Health</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='symbol'>:max</span><span class='comma'>,</span> <span class='symbol'>:current</span><span class='comma'>,</span> <span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>red</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span></code></pre>
+
+ </div>
+<p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>component_name</span>
+
+
+ <span class='type'>(<tt>String</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p>Name of your new component manager. Must be stylized in the format of constants in Ruby</p>
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>attrs</span>
+
+
+ <span class='type'>(<tt>:Symbols</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p>New components made with this manager will include these symbols as accessors, the values of these accessors will default to nil</p>
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>attrs_with_defaults</span>
+
+
+ <span class='type'>(<tt>Keyword: DefaultValue</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p>New components made with this manager will include these keywords as accessors, their defaults set to the values given to the keywords</p>
+</div>
+
+ </li>
+
+</ul>
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt><span class='object_link'><a href="ComponentManager.html" title="FelECS::ComponentManager (class)">ComponentManager</a></span></tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::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'>&quot;</span><span class='tstring_content'>Component Manager &#39;</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'>&#39; is already defined</span><span class='tstring_end'>&quot;</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="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="ComponentManager.html" title="FelECS::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="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::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="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::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'>&quot;</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'>&quot;</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'>&quot;</span><span class='tstring_content'>The attribute name \&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_content'>\&quot; is already a method</span><span class='tstring_end'>&quot;</span></span>
+ <span class='kw'>end</span>
+
+ <span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::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>
+ <span class='id identifier rubyid_attrs_with_defaults'>attrs_with_defaults</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid__default'>_default</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
+ <span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::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_reader'>attr_reader</span> <span class='id identifier rubyid_attr'>attr</span>
+ <span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::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_define_method'>define_method</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</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'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
+ <span class='kw'>unless</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_equal?'>equal?</span> <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_attr'>attr</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_instance_variable_set'>instance_variable_set</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>@</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</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='kw'>end</span>
+ <span class='kw'>end</span>
+ <span class='kw'>end</span>
+ <span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::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_define_method'>define_method</span><span class='lparen'>(</span><span class='symbol'>:set_defaults</span><span class='rparen'>)</span> <span class='kw'>do</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>
+ <span class='id identifier rubyid_instance_variable_set'>instance_variable_set</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>@</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attr'>attr</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_default'>default</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span><span class='rparen'>)</span>
+ <span class='kw'>end</span>
+ <span class='kw'>end</span>
+ <span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::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='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+</div>
+
+ <div id="footer">
+ Generated on Fri Jan 28 16:21:20 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/FelECS/Entities.html b/docs/FelECS/Entities.html
new file mode 100644
index 0000000..1d2bda6
--- /dev/null
+++ b/docs/FelECS/Entities.html
@@ -0,0 +1,792 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>
+ Class: FelECS::Entities
+
+ &mdash; 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 = "FelECS::Entities";
+ 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 (E)</a> &raquo;
+ <span class='title'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span>
+ &raquo;
+ <span class="title">Entities</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>Class: FelECS::Entities
+
+
+
+</h1>
+<div class="box_info">
+
+ <dl>
+ <dt>Inherits:</dt>
+ <dd>
+ <span class="inheritName">Object</span>
+
+ <ul class="fullTree">
+ <li>Object</li>
+
+ <li class="next">FelECS::Entities</li>
+
+ </ul>
+ <a href="#" class="inheritanceTree">show all</a>
+
+ </dd>
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+ <dl>
+ <dt>Defined in:</dt>
+ <dd>lib/felecs.rb<span class="defines">,<br />
+ lib/felecs/entity_manager.rb</span>
+</dd>
+ </dl>
+
+</div>
+
+<h2>Overview</h2><div class="docstring">
+ <div class="discussion">
+
+<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>
+</div>
+<div class="tags">
+
+
+</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="#add-instance_method" title="#add (instance method)">#<strong>add</strong>(*components_to_add) &#x21d2; Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Add any number components to the Entity.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#component-instance_method" title="#component (instance method)">#<strong>component</strong>(manager = nil) &#x21d2; Component </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>A single component from a component manager.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#components-instance_method" title="#components (instance method)">#<strong>components</strong> &#x21d2; Hash&lt;Component_Manager, Array&lt;Integer&gt;&gt; </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>A hash that uses component manager constant names as keys, and where the values of those keys are arrays that contain the the components attached to this entity.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#delete-instance_method" title="#delete (instance method)">#<strong>delete</strong> &#x21d2; Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Removes this Entity from the list and purges all references to this Entity from other Components, as well as its data.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(*components) &#x21d2; Entity </a>
+
+
+
+ </span>
+
+
+ <span class="note title constructor">constructor</span>
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Creating a new Entity.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#remove-instance_method" title="#remove (instance method)">#<strong>remove</strong>(*components_to_remove) &#x21d2; Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Remove a component from the Entity.</p>
+</div></span>
+
+</li>
+
+
+ </ul>
+
+
+<div id="constructor_details" class="method_details_list">
+ <h2>Constructor Details</h2>
+
+ <div class="method_details first">
+ <h3 class="signature first" id="initialize-instance_method">
+
+ #<strong>initialize</strong>(*components) &#x21d2; <tt>Entity</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Creating a new Entity</p>
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>components</span>
+
+
+ <span class='type'>(<tt><span class='object_link'><a href="Components.html" title="FelECS::Components (module)">Components</a></span></tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p>Can be any number of components, identical duplicates will be automatically purged however different components from the same component manager are allowed.</p>
+</div>
+
+ </li>
+
+</ul>
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+8
+9
+10
+11
+12</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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
+</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_components'>components</span><span class='rparen'>)</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__data'>_data</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span> <span class='kw'>self</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+</div>
+
+
+ <div id="instance_method_details" class="method_details_list">
+ <h2>Instance Method Details</h2>
+
+
+ <div class="method_details first">
+ <h3 class="signature first" id="add-instance_method">
+
+ #<strong>add</strong>(*components_to_add) &#x21d2; <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Add any number components to the Entity.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>components_to_add</span>
+
+
+ <span class='type'>(<tt>Component</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p>Any number of components created from any component manager</p>
+</div>
+
+ </li>
+
+</ul>
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p><code>true</code></p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+ <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_nil?'>nil?</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='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_component'>component</span><span class='rbracket'>]</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_push'>push</span> <span class='kw'>self</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'>:addition_triggers</span>
+ <span class='kw'>elsif</span> <span class='op'>!</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_include?'>include?</span> <span class='id identifier rubyid_component'>component</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_push'>push</span> <span class='id identifier rubyid_component'>component</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_push'>push</span> <span class='kw'>self</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'>:addition_triggers</span>
+ <span class='kw'>end</span>
+ <span class='kw'>end</span>
+ <span class='kw'>true</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="component-instance_method">
+
+ #<strong>component</strong>(manager = nil) &#x21d2; <tt>Component</tt>
+
+
+
+
+
+</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. Array notation is conventional for better readablility.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+ <div class="examples">
+ <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(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>
+<p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>manager</span>
+
+
+ <span class='type'>(<tt><span class='object_link'><a href="ComponentManager.html" title="FelECS::ComponentManager (class)">ComponentManager</a></span></tt>)</span>
+
+
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
+
+
+ &mdash;
+ <div class='inline'>
+<p>If you pass nil you can then use array notation to access the same value.</p>
+</div>
+
+ </li>
+
+</ul>
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Component</tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+ <span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::Entities (class)">Entities</a></span></span><span class='period'>.</span><span class='id identifier rubyid_component_redirect'>component_redirect</span><span class='period'>.</span><span class='id identifier rubyid_entity'>entity</span> <span class='op'>=</span> <span class='kw'>self</span>
+ <span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::Entities (class)">Entities</a></span></span><span class='period'>.</span><span class='id identifier rubyid_component_redirect'>component_redirect</span>
+ <span class='kw'>else</span>
+ <span class='kw'>if</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_nil?'>nil?</span>
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>This entity(</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='embexpr_end'>}</span><span class='tstring_content'>) doesnt have any components of this type: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_manager'>manager</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
+ <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'>&gt;</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'>&quot;</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'>&quot;</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>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="components-instance_method">
+
+ #<strong>components</strong> &#x21d2; <tt>Hash&lt;Component_Manager, Array&lt;Integer&gt;&gt;</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>A hash that uses component manager constant names as keys, and where the values of those keys are arrays that contain the the components attached to this entity.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Hash&lt;Component_Manager, Array&lt;Integer&gt;&gt;</tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+16
+17
+18</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="delete-instance_method">
+
+ #<strong>delete</strong> &#x21d2; <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Removes this Entity from the list and purges all references to this Entity from other Components, as well as its data.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p><code>true</code></p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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_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>
+ <span class='kw'>end</span>
+ <span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::Entities (class)">Entities</a></span></span><span class='period'>.</span><span class='id identifier rubyid__data'>_data</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='kw'>self</span>
+ <span class='ivar'>@components</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
+ <span class='kw'>true</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="remove-instance_method">
+
+ #<strong>remove</strong>(*components_to_remove) &#x21d2; <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Remove a component from the Entity</p>
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>components_to_remove</span>
+
+
+ <span class='type'>(<tt>Component</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p>A component created from any component manager</p>
+</div>
+
+ </li>
+
+</ul>
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p><code>true</code></p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+87
+88
+89
+90
+91
+92
+93
+94
+95</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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='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>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+</div>
+
+ <div id="footer">
+ Generated on Fri Jan 28 16:21:21 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/FelECS/Order.html b/docs/FelECS/Order.html
new file mode 100644
index 0000000..8ea39da
--- /dev/null
+++ b/docs/FelECS/Order.html
@@ -0,0 +1,251 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>
+ Module: FelECS::Order
+
+ &mdash; 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 = "FelECS::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> &raquo;
+ <span class='title'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span>
+ &raquo;
+ <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: FelECS::Order
+
+
+
+</h1>
+<div class="box_info">
+
+
+
+
+
+
+
+
+
+
+
+ <dl>
+ <dt>Defined in:</dt>
+ <dd>lib/felecs.rb<span class="defines">,<br />
+ lib/felecs/order.rb</span>
+</dd>
+ </dl>
+
+</div>
+
+<h2>Overview</h2><div class="docstring">
+ <div class="discussion">
+
+<p>Sets the priority of a list of Systems or Scenes for you in the order you pass them to this class.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div>
+
+
+
+
+
+
+
+ <h2>
+ Class 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-class_method" title="sort (class method)">.<strong>sort</strong>(*sortables) &#x21d2; Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Sets the priority of all items passed into this method according to the order they were passed.</p>
+</div></span>
+
+</li>
+
+
+ </ul>
+
+
+
+
+ <div id="class_method_details" class="method_details_list">
+ <h2>Class Method Details</h2>
+
+
+ <div class="method_details first">
+ <h3 class="signature first" id="sort-class_method">
+
+ .<strong>sort</strong>(*sortables) &#x21d2; <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Sets the priority of all items passed into this method according to the order they were passed. If an array is one of the elements then it will give all of those elements in the array the same priority.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>sortables</span>
+
+
+ <span class='type'>(<tt>(<span class='object_link'><a href="Systems.html" title="FelECS::Systems (class)">Systems</a></span> and Array&lt;<span class='object_link'><a href="Systems.html" title="FelECS::Systems (class)">Systems</a></span>&gt;) or (<span class='object_link'><a href="Scenes.html" title="FelECS::Scenes (class)">Scenes</a></span> and Array&lt;<span class='object_link'><a href="Scenes.html" title="FelECS::Scenes (class)">Scenes</a></span>&gt;)</tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p><code>true</code>.</p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/order.rb', line 11</span>
+
+<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</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='id identifier rubyid_sortables'>sortables</span><span class='period'>.</span><span class='id identifier rubyid_each_with_index'>each_with_index</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_sorted'>sorted</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span><span class='op'>|</span>
+ <span class='kw'>if</span> <span class='id identifier rubyid_sorted'>sorted</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span> <span class='symbol'>:priority</span>
+ <span class='id identifier rubyid_sorted'>sorted</span><span class='period'>.</span><span class='id identifier rubyid_priority'>priority</span> <span class='op'>=</span> <span class='id identifier rubyid_index'>index</span>
+ <span class='kw'>else</span>
+ <span class='id identifier rubyid_sorted'>sorted</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_item'>item</span><span class='op'>|</span>
+ <span class='id identifier rubyid_item'>item</span><span class='period'>.</span><span class='id identifier rubyid_priority'>priority</span> <span class='op'>=</span> <span class='id identifier rubyid_index'>index</span>
+ <span class='kw'>end</span>
+ <span class='kw'>end</span>
+ <span class='kw'>end</span>
+ <span class='kw'>true</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+</div>
+
+ <div id="footer">
+ Generated on Fri Jan 28 16:21:21 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/FelECS/Scenes.html b/docs/FelECS/Scenes.html
new file mode 100644
index 0000000..e548278
--- /dev/null
+++ b/docs/FelECS/Scenes.html
@@ -0,0 +1,765 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>
+ Class: FelECS::Scenes
+
+ &mdash; 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 = "FelECS::Scenes";
+ 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 (S)</a> &raquo;
+ <span class='title'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span>
+ &raquo;
+ <span class="title">Scenes</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>Class: FelECS::Scenes
+
+
+
+</h1>
+<div class="box_info">
+
+ <dl>
+ <dt>Inherits:</dt>
+ <dd>
+ <span class="inheritName">Object</span>
+
+ <ul class="fullTree">
+ <li>Object</li>
+
+ <li class="next">FelECS::Scenes</li>
+
+ </ul>
+ <a href="#" class="inheritanceTree">show all</a>
+
+ </dd>
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+ <dl>
+ <dt>Defined in:</dt>
+ <dd>lib/felecs.rb<span class="defines">,<br />
+ lib/felecs/scene_manager.rb</span>
+</dd>
+ </dl>
+
+</div>
+
+<h2>Overview</h2><div class="docstring">
+ <div class="discussion">
+
+<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="FelECS::Scenes (class)">Scenes</a></span> namespace as Constants.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div>
+
+
+
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
+ <ul class="summary">
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#priority-instance_method" title="#priority (instance method)">#<strong>priority</strong> &#x21d2; Object </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>How early this Scene should be executed in a list of Scenes.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#systems-instance_method" title="#systems (instance method)">#<strong>systems</strong> &#x21d2; Array&lt;System&gt; </a>
+
+
+
+ </span>
+
+
+
+
+ <span class="note title readonly">readonly</span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>The list of Systems this Scene contains.</p>
+</div></span>
+
+</li>
+
+
+ </ul>
+
+
+
+
+
+ <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="#add-instance_method" title="#add (instance method)">#<strong>add</strong>(*systems_to_add) &#x21d2; Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Adds any number of Systems to this Scene.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#call-instance_method" title="#call (instance method)">#<strong>call</strong> &#x21d2; Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Execute all systems in this Scene, in the order of their priority.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#clear-instance_method" title="#clear (instance method)">#<strong>clear</strong> &#x21d2; Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Removes all Systems from this Scene.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(name, priority: 0) &#x21d2; Scenes </a>
+
+
+
+ </span>
+
+
+ <span class="note title constructor">constructor</span>
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Create a new Scene using the name given.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#remove-instance_method" title="#remove (instance method)">#<strong>remove</strong>(*systems_to_remove) &#x21d2; Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Removes any number of Systems from this Scene.</p>
+</div></span>
+
+</li>
+
+
+ </ul>
+
+
+<div id="constructor_details" class="method_details_list">
+ <h2>Constructor Details</h2>
+
+ <div class="method_details first">
+ <h3 class="signature first" id="initialize-instance_method">
+
+ #<strong>initialize</strong>(name, priority: 0) &#x21d2; <tt><span class='object_link'><a href="" title="FelECS::Scenes (class)">Scenes</a></span></tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Create a new Scene using the name given</p>
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>name</span>
+
+
+ <span class='type'>(<tt>String</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p>String format must follow requirements of a constant</p>
+</div>
+
+ </li>
+
+</ul>
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+22
+23
+24
+25</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+ <span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::Scenes (class)">Scenes</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>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+</div>
+
+ <div id="instance_attr_details" class="attr_details">
+ <h2>Instance Attribute Details</h2>
+
+
+ <span id="priority=-instance_method"></span>
+ <div class="method_details first">
+ <h3 class="signature first" id="priority-instance_method">
+
+ #<strong>priority</strong> &#x21d2; <tt>Object</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>How early this Scene should be executed in a list of Scenes</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+12
+13
+14</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/scene_manager.rb', line 12</span>
+
+<span class='kw'>def</span> <span class='id identifier rubyid_priority'>priority</span>
+ <span class='ivar'>@priority</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+
+ <span id="systems=-instance_method"></span>
+ <div class="method_details ">
+ <h3 class="signature " id="systems-instance_method">
+
+ #<strong>systems</strong> &#x21d2; <tt>Array&lt;System&gt;</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>The list of Systems this Scene contains</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Array&lt;System&gt;</tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+29
+30
+31</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+
+ <div id="instance_method_details" class="method_details_list">
+ <h2>Instance Method Details</h2>
+
+
+ <div class="method_details first">
+ <h3 class="signature first" id="add-instance_method">
+
+ #<strong>add</strong>(*systems_to_add) &#x21d2; <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Adds any number of Systems to this Scene</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p><code>true</code></p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+42
+43
+44
+45
+46
+47
+48
+49</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+ <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'>systems</span><span class='period'>.</span><span class='id identifier rubyid_sort_by'>sort_by</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:priority</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_systems_to_add'>systems_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_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='op'>|=</span> <span class='lbracket'>[</span><span class='kw'>self</span><span class='rbracket'>]</span>
+ <span class='kw'>end</span>
+ <span class='kw'>true</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="call-instance_method">
+
+ #<strong>call</strong> &#x21d2; <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Execute all systems in this Scene, in the order of their priority</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p><code>true</code></p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+35
+36
+37
+38</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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'>&amp;</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="clear-instance_method">
+
+ #<strong>clear</strong> &#x21d2; <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Removes all Systems from this Scene</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p><code>true</code></p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+60
+61
+62
+63
+64
+65
+66
+67</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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'># FelECS::Stage.update_systems_list if FelECS::Stage.scenes.include? self
+</span> <span class='kw'>true</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="remove-instance_method">
+
+ #<strong>remove</strong>(*systems_to_remove) &#x21d2; <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Removes any number of Systems from this Scene</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p><code>true</code></p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+53
+54
+55
+56</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+ <span class='kw'>true</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+</div>
+
+ <div id="footer">
+ Generated on Fri Jan 28 16:21:21 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/FelECS/Stage.html b/docs/FelECS/Stage.html
new file mode 100644
index 0000000..ec24ccf
--- /dev/null
+++ b/docs/FelECS/Stage.html
@@ -0,0 +1,572 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>
+ Module: FelECS::Stage
+
+ &mdash; 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 = "FelECS::Stage";
+ 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 (S)</a> &raquo;
+ <span class='title'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span>
+ &raquo;
+ <span class="title">Stage</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: FelECS::Stage
+
+
+
+</h1>
+<div class="box_info">
+
+
+
+
+
+
+
+
+
+
+
+ <dl>
+ <dt>Defined in:</dt>
+ <dd>lib/felecs.rb<span class="defines">,<br />
+ lib/felecs/stage_manager.rb</span>
+</dd>
+ </dl>
+
+</div>
+
+<h2>Overview</h2><div class="docstring">
+ <div class="discussion">
+
+<p>Stores Scenes you add to it which you want to execute on each frame. When called upon will execute all Systems in the Scenes in the Stage and will execute them according to their priority order.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div>
+
+
+
+ <h2>Class Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
+ <ul class="summary">
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#scenes-class_method" title="scenes (class method)">.<strong>scenes</strong> &#x21d2; Array&lt;Scene&gt; </a>
+
+
+
+ </span>
+
+
+
+
+ <span class="note title readonly">readonly</span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Contains all the Scenes added to the Stage.</p>
+</div></span>
+
+</li>
+
+
+ </ul>
+
+
+
+
+
+ <h2>
+ Class Method Summary
+ <small><a href="#" class="summary_toggle">collapse</a></small>
+ </h2>
+
+ <ul class="summary">
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#add-class_method" title="add (class method)">.<strong>add</strong>(*scenes_to_add) &#x21d2; Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Add any number of Scenes to the Stage.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#call-class_method" title="call (class method)">.<strong>call</strong> &#x21d2; Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Executes one frame of the game.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#clear-class_method" title="clear (class method)">.<strong>clear</strong> &#x21d2; Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Clears all Scenes that were added to the Stage.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#remove-class_method" title="remove (class method)">.<strong>remove</strong>(*scenes_to_remove) &#x21d2; Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Remove any number of Scenes from the Stage.</p>
+</div></span>
+
+</li>
+
+
+ </ul>
+
+
+
+ <div id="class_attr_details" class="attr_details">
+ <h2>Class Attribute Details</h2>
+
+
+ <span id="scenes=-class_method"></span>
+ <div class="method_details first">
+ <h3 class="signature first" id="scenes-class_method">
+
+ .<strong>scenes</strong> &#x21d2; <tt>Array&lt;Scene&gt;</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Contains all the Scenes added to the Stage</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Array&lt;Scene&gt;</tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+42
+43
+44</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+
+ <div id="class_method_details" class="method_details_list">
+ <h2>Class Method Details</h2>
+
+
+ <div class="method_details first">
+ <h3 class="signature first" id="add-class_method">
+
+ .<strong>add</strong>(*scenes_to_add) &#x21d2; <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Add any number of Scenes to the Stage</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p><code>true</code></p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+13
+14
+15
+16
+17</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+ <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'>scenes</span><span class='period'>.</span><span class='id identifier rubyid_sort_by'>sort_by</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:priority</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="call-class_method">
+
+ .<strong>call</strong> &#x21d2; <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Executes one frame of the game. This executes all the Scenes added to the Stage in order of their priority.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p><code>true</code></p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+35
+36
+37
+38</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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'>&amp;</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="clear-class_method">
+
+ .<strong>clear</strong> &#x21d2; <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Clears all Scenes that were added to the Stage</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p><code>true</code></p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+28
+29
+30
+31</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+ <span class='kw'>true</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="remove-class_method">
+
+ .<strong>remove</strong>(*scenes_to_remove) &#x21d2; <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Remove any number of Scenes from the Stage</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p><code>true</code></p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+21
+22
+23
+24</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+ <span class='kw'>true</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+</div>
+
+ <div id="footer">
+ Generated on Fri Jan 28 16:21:21 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/FelECS/Systems.html b/docs/FelECS/Systems.html
new file mode 100644
index 0000000..867d3a2
--- /dev/null
+++ b/docs/FelECS/Systems.html
@@ -0,0 +1,1505 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>
+ Class: FelECS::Systems
+
+ &mdash; 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 = "FelECS::Systems";
+ 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 (S)</a> &raquo;
+ <span class='title'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span>
+ &raquo;
+ <span class="title">Systems</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>Class: FelECS::Systems
+
+
+
+</h1>
+<div class="box_info">
+
+ <dl>
+ <dt>Inherits:</dt>
+ <dd>
+ <span class="inheritName">Object</span>
+
+ <ul class="fullTree">
+ <li>Object</li>
+
+ <li class="next">FelECS::Systems</li>
+
+ </ul>
+ <a href="#" class="inheritanceTree">show all</a>
+
+ </dd>
+ </dl>
+
+
+
+
+
+
+
+
+
+
+
+ <dl>
+ <dt>Defined in:</dt>
+ <dd>lib/felecs.rb<span class="defines">,<br />
+ lib/felecs/system_manager.rb</span>
+</dd>
+ </dl>
+
+</div>
+
+<h2>Overview</h2><div class="docstring">
+ <div class="discussion">
+
+<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="FelECS::Systems (class)">Systems</a></span> namespace as Constants. You can use array methods directly on this class to access Systems.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div>
+
+
+
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
+ <ul class="summary">
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#addition_triggers-instance_method" title="#addition_triggers (instance method)">#<strong>addition_triggers</strong> &#x21d2; Array&lt;Component&gt; </a>
+
+
+
+ </span>
+
+
+
+
+ <span class="note title readonly">readonly</span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Stores references to components or their managers that trigger this component when a component or component from that manager is added to an entity.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#attr_triggers-instance_method" title="#attr_triggers (instance method)">#<strong>attr_triggers</strong> &#x21d2; Hash&lt;Symbol, Array&lt;Symbol&gt;&gt; </a>
+
+
+
+ </span>
+
+
+
+
+ <span class="note title readonly">readonly</span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Stores references to systems that should be triggered when an attribute from this manager is changed Do not edit this hash as it is managed by FelECS automatically.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#priority-instance_method" title="#priority (instance method)">#<strong>priority</strong> &#x21d2; Object </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>How early this System should be executed in a list of Systems.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#removal_triggers-instance_method" title="#removal_triggers (instance method)">#<strong>removal_triggers</strong> &#x21d2; Array&lt;Component&gt; </a>
+
+
+
+ </span>
+
+
+
+
+ <span class="note title readonly">readonly</span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Stores references to components or their managers that trigger this component when a component or component from that manager is removed from an entity.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#scenes-instance_method" title="#scenes (instance method)">#<strong>scenes</strong> &#x21d2; Object </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'></div></span>
+
+</li>
+
+
+ </ul>
+
+
+
+
+
+ <h2>
+ Class Method Summary
+ <small><a href="#" class="summary_toggle">collapse</a></small>
+ </h2>
+
+ <ul class="summary">
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#const_cache-class_method" title="const_cache (class method)">.<strong>const_cache</strong> &#x21d2; Object </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Stores the systems in <span class='object_link'><a href="Components.html" title="FelECS::Components (module)">Components</a></span>.</p>
+</div></span>
+
+</li>
+
+
+ </ul>
+
+ <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="#call-instance_method" title="#call (instance method)">#<strong>call</strong> &#x21d2; Object </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Manually execute the system a single time.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#clear_triggers-instance_method" title="#clear_triggers (instance method)">#<strong>clear_triggers</strong>(*trigger_types, component_or_manager: nil) &#x21d2; Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Removes triggers from this system.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(name, priority: 0, &amp;block) &#x21d2; Systems </a>
+
+
+
+ </span>
+
+
+ <span class="note title constructor">constructor</span>
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Creates a new System which can be accessed as a constant under the namespace <span class='object_link'><a href="" title="FelECS::Systems (class)">Systems</a></span>.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#redefine-instance_method" title="#redefine (instance method)">#<strong>redefine</strong>(&amp;block) &#x21d2; Object </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Redefine what code is executed by this System when it is called upon.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#trigger_when_added-instance_method" title="#trigger_when_added (instance method)">#<strong>trigger_when_added</strong>(component_or_manager) &#x21d2; Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Add a component or component manager so that it triggers this system when the component or a component from the component manager is added to an entity.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#trigger_when_is_changed-instance_method" title="#trigger_when_is_changed (instance method)">#<strong>trigger_when_is_changed</strong>(component_or_manager, attr) &#x21d2; Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Add a component or component manager so that it triggers this system when a component&#39;s attribute is changed.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#trigger_when_removed-instance_method" title="#trigger_when_removed (instance method)">#<strong>trigger_when_removed</strong>(component_or_manager) &#x21d2; Boolean </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Add a component or component manager so that it triggers this system when the component or a component from the component manager is removed from an entity.</p>
+</div></span>
+
+</li>
+
+
+ </ul>
+
+
+<div id="constructor_details" class="method_details_list">
+ <h2>Constructor Details</h2>
+
+ <div class="method_details first">
+ <h3 class="signature first" id="initialize-instance_method">
+
+ #<strong>initialize</strong>(name, priority: 0, &amp;block) &#x21d2; <tt><span class='object_link'><a href="" title="FelECS::Systems (class)">Systems</a></span></tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Creates a new System which can be accessed as a constant under the namespace <span class='object_link'><a href="" title="FelECS::Systems (class)">FelECS::Systems</a></span>. The name given is what constant the system is assigned to</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+ <div class="examples">
+ <p class="tag_title">Examples:</p>
+
+
+ <pre class="example code"><code><span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::Systems (class)">Systems</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>PassiveHeal</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>priority:</span> <span class='op'>-</span><span class='int'>2</span><span class='rparen'>)</span> <span class='kw'>do</span>
+ <span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Components.html" title="FelECS::Components (module)">Components</a></span></span><span class='op'>::</span><span class='const'>Health</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_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_hp'>hp</span> <span class='op'>+=</span> <span class='int'>5</span>
+ <span class='kw'>end</span>
+<span class='kw'>end</span>
+<span class='comment'># Give it a low priority so other systems such as a
+</span><span class='comment'># Poison system would kill the player first</span></code></pre>
+
+ </div>
+<p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>name</span>
+
+
+ <span class='type'>(<tt>String</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p>The name this system will use. Needs to to be in the Ruby Constant format.</p>
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>priority</span>
+
+
+ <span class='type'>(<tt>Integer</tt>)</span>
+
+
+ <em class="default">(defaults to: <tt>0</tt>)</em>
+
+
+ &mdash;
+ <div class='inline'>
+<p>Which priority order this system should be executed in relative to other systems. Higher means executed earlier.</p>
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>block</span>
+
+
+ <span class='type'>(<tt>Proc</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p>The code you wish to be executed when the system is triggered. Can be defined by using a <tt>do end</tt> block or using <tt>{ }</tt> braces.</p>
+</div>
+
+ </li>
+
+</ul>
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+115
+116
+117
+118
+119
+120
+121</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
+ <span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::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>
+ <span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::Systems (class)">Systems</a></span></span><span class='period'>.</span><span class='id identifier rubyid_update_const_cache'>update_const_cache</span>
+ <span class='ivar'>@priority</span> <span class='op'>=</span> <span class='id identifier rubyid_priority'>priority</span>
+ <span class='ivar'>@block</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
+ <span class='ivar'>@scenes</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+</div>
+
+ <div id="instance_attr_details" class="attr_details">
+ <h2>Instance Attribute Details</h2>
+
+
+ <span id="addition_triggers=-instance_method"></span>
+ <div class="method_details first">
+ <h3 class="signature first" id="addition_triggers-instance_method">
+
+ #<strong>addition_triggers</strong> &#x21d2; <tt>Array&lt;Component&gt;</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Stores references to components or their managers that trigger this component when a component or component from that manager is added to an entity. Do not edit this hash as it is managed by FelECS automatically.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Array&lt;Component&gt;</tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+35
+36
+37</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+
+ <span id="attr_triggers=-instance_method"></span>
+ <div class="method_details ">
+ <h3 class="signature " id="attr_triggers-instance_method">
+
+ #<strong>attr_triggers</strong> &#x21d2; <tt>Hash&lt;Symbol, Array&lt;Symbol&gt;&gt;</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Stores references to systems that should be triggered when an attribute from this manager is changed Do not edit this hash as it is managed by FelECS automatically.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Hash&lt;Symbol, Array&lt;Symbol&gt;&gt;</tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+52
+53
+54</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+
+ <span id="priority=-instance_method"></span>
+ <div class="method_details ">
+ <h3 class="signature " id="priority-instance_method">
+
+ #<strong>priority</strong> &#x21d2; <tt>Object</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>How early this System should be executed in a list of Systems</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+6
+7
+8</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/system_manager.rb', line 6</span>
+
+<span class='kw'>def</span> <span class='id identifier rubyid_priority'>priority</span>
+ <span class='ivar'>@priority</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+
+ <span id="removal_triggers=-instance_method"></span>
+ <div class="method_details ">
+ <h3 class="signature " id="removal_triggers-instance_method">
+
+ #<strong>removal_triggers</strong> &#x21d2; <tt>Array&lt;Component&gt;</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Stores references to components or their managers that trigger this component when a component or component from that manager is removed from an entity. Do not edit this hash as it is managed by FelECS automatically.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Array&lt;Component&gt;</tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+44
+45
+46</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+
+ <span id="scenes=-instance_method"></span>
+ <div class="method_details ">
+ <h3 class="signature " id="scenes-instance_method">
+
+ #<strong>scenes</strong> &#x21d2; <tt>Object</tt>
+
+
+
+
+
+</h3><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+19
+20
+21</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+
+ <div id="class_method_details" class="method_details_list">
+ <h2>Class Method Details</h2>
+
+
+ <div class="method_details first">
+ <h3 class="signature first" id="const_cache-class_method">
+
+ .<strong>const_cache</strong> &#x21d2; <tt>Object</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Stores the systems in <span class='object_link'><a href="Components.html" title="FelECS::Components (module)">Components</a></span>. This is needed because calling `FelECS::Components.constants` will not let you iterate over the value of the constants but will instead give you an array of symbols. This caches the convertion of those symbols to the actual value of the constants</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+63
+64
+65</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/system_manager.rb', line 63</span>
+
+<span class='kw'>def</span> <span class='id identifier rubyid_const_cache'>const_cache</span>
+ <span class='ivar'>@const_cache</span> <span class='op'>||</span> <span class='id identifier rubyid_update_const_cache'>update_const_cache</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+ <div id="instance_method_details" class="method_details_list">
+ <h2>Instance Method Details</h2>
+
+
+ <div class="method_details first">
+ <h3 class="signature first" id="call-instance_method">
+
+ #<strong>call</strong> &#x21d2; <tt>Object</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Manually execute the system a single time</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+124
+125
+126</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="clear_triggers-instance_method">
+
+ #<strong>clear_triggers</strong>(*trigger_types, component_or_manager: nil) &#x21d2; <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Removes triggers from this system. This function is fairly flexible so it can accept a few different inputs For addition and removal triggers, you can optionally pass in a component, or a manager to clear specifically the relevant triggers for that one component or manager. If you do not pass a component or manager then it will clear triggers for all components and managers. For attr_triggers</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+ <div class="examples">
+ <p class="tag_title">Examples:</p>
+
+
+ <pre class="example code"><code><span class='comment'># To clear all triggers that execute this system when a component is added:
+</span><span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>ExampleSystem</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span> <span class='symbol'>:addition_triggers</span>
+<span class='comment'># Same as above but for when a component is removed instead
+</span><span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>ExampleSystem</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span> <span class='symbol'>:removal_triggers</span>
+<span class='comment'># Same as above but for when a component has a certain attribute changed
+</span><span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>ExampleSystem</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span> <span class='symbol'>:attr_triggers</span>
+
+<span class='comment'># Clear a trigger from a specific component
+</span><span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>ExampleSystem</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span> <span class='symbol'>:addition_triggers</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'>Component</span><span class='op'>::</span><span class='const'>ExampleComponent</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
+<span class='comment'># Clear a trigger from a specific component manager
+</span><span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>ExampleSystem</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span> <span class='symbol'>:addition_triggers</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'>Component</span><span class='op'>::</span><span class='const'>ExampleComponent</span>
+
+<span class='comment'># Clear the trigger that executes a system when the &#39;:example_attr&#39; is changes
+</span><span class='const'><span class='object_link'><a href="../FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>ExampleSystem</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span> <span class='symbol'>:attr_triggers</span><span class='comma'>,</span> <span class='symbol'>:example_attr</span></code></pre>
+
+ </div>
+<p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>trigger_types</span>
+
+
+ <span class='type'>(<tt>:Symbols</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p>One or more of the following trigger types: <code>:addition_triggers</code>, <code>:removal_triggers</code>, or <code>:attr_triggers</code>. If attr_triggers is used then you may pass attributes you wish to be cleared as symbols in this parameter as well</p>
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>component_or_manager</span>
+
+
+ <span class='type'>(<tt>Component or <span class='object_link'><a href="ComponentManager.html" title="FelECS::ComponentManager (class)">ComponentManager</a></span></tt>)</span>
+
+
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
+
+
+ &mdash;
+ <div class='inline'>
+<p>The object to clear triggers from. Use Nil to clear triggers from all components associated with this system.</p>
+</div>
+
+ </li>
+
+</ul>
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p><code>true</code></p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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='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='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='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>
+
+ <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='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='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='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'>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='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'>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'>&amp;</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='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='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</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'>&quot;</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='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>
+ <span class='kw'>true</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="redefine-instance_method">
+
+ #<strong>redefine</strong>(&amp;block) &#x21d2; <tt>Object</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Redefine what code is executed by this System when it is called upon.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>block</span>
+
+
+ <span class='type'>(<tt>Proc</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p>The code you wish to be executed when the system is triggered. Can be defined by using a <tt>do end</tt> block or using <tt>{ }</tt> braces.</p>
+</div>
+
+ </li>
+
+</ul>
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+130
+131
+132</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/system_manager.rb', line 130</span>
+
+<span class='kw'>def</span> <span class='id identifier rubyid_redefine'>redefine</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
+ <span class='ivar'>@block</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="trigger_when_added-instance_method">
+
+ #<strong>trigger_when_added</strong>(component_or_manager) &#x21d2; <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Add a component or component manager so that it triggers this system when the component or a component from the component manager is added to an entity</p>
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>component_or_manager</span>
+
+
+ <span class='type'>(<tt>Component or <span class='object_link'><a href="ComponentManager.html" title="FelECS::ComponentManager (class)">ComponentManager</a></span></tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p>The component or component manager to trigger this system when added</p>
+</div>
+
+ </li>
+
+</ul>
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p><code>true</code></p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+227
+228
+229
+230
+231</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+ <span class='id identifier rubyid_component_or_manager'>component_or_manager</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='kw'>self</span><span class='rbracket'>]</span>
+ <span class='kw'>true</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="trigger_when_is_changed-instance_method">
+
+ #<strong>trigger_when_is_changed</strong>(component_or_manager, attr) &#x21d2; <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Add a component or component manager so that it triggers this system when a component&#39;s attribute is changed.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p><code>true</code></p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+ <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'>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='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='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>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="trigger_when_removed-instance_method">
+
+ #<strong>trigger_when_removed</strong>(component_or_manager) &#x21d2; <tt>Boolean</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Add a component or component manager so that it triggers this system when the component or a component from the component manager is removed from an entity</p>
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>component_or_manager</span>
+
+
+ <span class='type'>(<tt>Component or <span class='object_link'><a href="ComponentManager.html" title="FelECS::ComponentManager (class)">ComponentManager</a></span></tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p>The component or component manager to trigger this system when removed</p>
+</div>
+
+ </li>
+
+</ul>
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Boolean</tt>)</span>
+
+
+
+ &mdash;
+ <div class='inline'>
+<p><code>true</code></p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+236
+237
+238
+239
+240</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/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>
+ <span class='id identifier rubyid_component_or_manager'>component_or_manager</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='kw'>self</span><span class='rbracket'>]</span>
+ <span class='kw'>true</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ </div>
+
+</div>
+
+ <div id="footer">
+ Generated on Fri Jan 28 16:21:21 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/_index.html b/docs/_index.html
index f850b17..13029f8 100644
--- a/docs/_index.html
+++ b/docs/_index.html
@@ -75,6 +75,100 @@
<tr>
<td valign='top' width="33%">
+
+ <ul id="alpha_C" class="alpha">
+ <li class="letter">C</li>
+ <ul>
+
+ <li>
+ <span class='object_link'><a href="FelECS/ComponentManager.html" title="FelECS::ComponentManager (class)">ComponentManager</a></span>
+
+ <small>(FelECS)</small>
+
+ </li>
+
+ <li>
+ <span class='object_link'><a href="FelECS/Components.html" title="FelECS::Components (module)">Components</a></span>
+
+ <small>(FelECS)</small>
+
+ </li>
+
+ </ul>
+ </ul>
+
+
+ <ul id="alpha_E" class="alpha">
+ <li class="letter">E</li>
+ <ul>
+
+ <li>
+ <span class='object_link'><a href="FelECS/Entities.html" title="FelECS::Entities (class)">Entities</a></span>
+
+ <small>(FelECS)</small>
+
+ </li>
+
+ </ul>
+ </ul>
+
+
+ <ul id="alpha_F" class="alpha">
+ <li class="letter">F</li>
+ <ul>
+
+ <li>
+ <span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span>
+
+ </li>
+
+ </ul>
+ </ul>
+
+
+ <ul id="alpha_O" class="alpha">
+ <li class="letter">O</li>
+ <ul>
+
+ <li>
+ <span class='object_link'><a href="FelECS/Order.html" title="FelECS::Order (module)">Order</a></span>
+
+ <small>(FelECS)</small>
+
+ </li>
+
+ </ul>
+ </ul>
+
+
+ <ul id="alpha_S" class="alpha">
+ <li class="letter">S</li>
+ <ul>
+
+ <li>
+ <span class='object_link'><a href="FelECS/Scenes.html" title="FelECS::Scenes (class)">Scenes</a></span>
+
+ <small>(FelECS)</small>
+
+ </li>
+
+ <li>
+ <span class='object_link'><a href="FelECS/Stage.html" title="FelECS::Stage (module)">Stage</a></span>
+
+ <small>(FelECS)</small>
+
+ </li>
+
+ <li>
+ <span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span>
+
+ <small>(FelECS)</small>
+
+ </li>
+
+ </ul>
+ </ul>
+
</td>
</tr>
</table>
@@ -84,7 +178,7 @@
</div>
<div id="footer">
- Generated on Thu Jan 20 22:40:31 2022 by
+ Generated on Fri Jan 28 16:21:20 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 3f4c240..924f66a 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_FelECS' class='even'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_FelECS::ComponentManager' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelECS/ComponentManager.html" title="FelECS::ComponentManager (class)">ComponentManager</a></span> &lt; Object<small class='search_info'>FelECS</small></div></li><li id='object_FelECS::Components' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::Components (module)">Components</a></span><small class='search_info'>FelECS</small></div></li><li id='object_FelECS::Entities' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelECS/Entities.html" title="FelECS::Entities (class)">Entities</a></span> &lt; Object<small class='search_info'>FelECS</small></div></li><li id='object_FelECS::Order' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelECS/Order.html" title="FelECS::Order (module)">Order</a></span><small class='search_info'>FelECS</small></div></li><li id='object_FelECS::Scenes' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelECS/Scenes.html" title="FelECS::Scenes (class)">Scenes</a></span> &lt; Object<small class='search_info'>FelECS</small></div></li><li id='object_FelECS::Stage' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelECS/Stage.html" title="FelECS::Stage (module)">Stage</a></span><small class='search_info'>FelECS</small></div></li><li id='object_FelECS::Systems' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span> &lt; Object<small class='search_info'>FelECS</small></div></li></ul></li>
</ul>
</div>
diff --git a/docs/file.README.html b/docs/file.README.html
index fbe3543..cae63f4 100644
--- a/docs/file.README.html
+++ b/docs/file.README.html
@@ -59,12 +59,12 @@
<div id="content"><div id='filecontents'><p><img src="https://raw.githubusercontent.com/realtradam/FelECS/master/logos/felecs-logo-text.png" alt="FelECS"></p>
-<!-- ![FelECS](https://filestorage.catgirls.rodeo/images/felflame-logo-smaller-text.png) -->
+<!-- ![FelFlame](https://filestorage.catgirls.rodeo/images/felecs-logo-smaller-text.png) -->
-<p><a href="https://codeclimate.com/github/realtradam/FelECS/maintainability"><img src="https://api.codeclimate.com/v1/badges/56d425d9078e98efb74b/maintainability" alt="Maintainability"></a>
-<a href="https://codeclimate.com/github/realtradam/FelECS/test_coverage"><img src="https://api.codeclimate.com/v1/badges/56d425d9078e98efb74b/test_coverage" alt="Test Coverage"></a>
+<p><a href="https://codeclimate.com/github/realtradam/FelFlame/maintainability"><img src="https://api.codeclimate.com/v1/badges/56d425d9078e98efb74b/maintainability" alt="Maintainability"></a>
+<a href="https://codeclimate.com/github/realtradam/FelFlame/test_coverage"><img src="https://api.codeclimate.com/v1/badges/56d425d9078e98efb74b/test_coverage" alt="Test Coverage"></a>
<a href="http://inch-ci.org/github/realtradam/FelECS"><img src="http://inch-ci.org/github/realtradam/FelECS.svg?branch=master" alt="Inline docs"></a>
-<a href="https://github.com/realtradam/FelECS/blob/master/LICENSE"><img src="https://img.shields.io/github/license/realtradam/FelECS?label=license&style=flat" alt="MIT License"></a>
+<a href="https://github.com/realtradam/FelFlame/blob/master/LICENSE"><img src="https://img.shields.io/github/license/realtradam/FelECS" alt="MIT License"></a>
<a href="https://ko-fi.com/tradam"><img src="https://img.shields.io/static/v1?message=Buy%20me%20a%20coffee&logo=kofi&labelColor=ff5e5b&color=434B57&logoColor=white&label=%20" alt="Ko-Fi"></a></p>
<p><strong><a href="https://felflame.tradam.fyi/">Check out the comprehensive documentation here!</a></strong></p>
@@ -104,42 +104,15 @@
<li><a href="#deleting-components">Deleting Components</a></li>
<li><a href="#accessing-components-attached-entities">Accessing Components&#39; attached Entities</a></li>
</ul></li>
-</ul></li>
-<li><a href="#get-the-first-entity-attached">get the first entity attached.</a></li>
-<li><a href="#this-will-throw-a-warning-if-there-is-more-or-less-then">this will throw a warning if there is more or less then</a></li>
-<li><a href="#exactly-one-entity">exactly one entity</a>
-
-<ul>
<li><a href="#systems-1">Systems</a>
<ul>
<li><a href="#creation-1">Creation</a></li>
+<li><a href="#execution">Execution</a></li>
+<li><a href="#alternative-execution">Alternative Execution</a></li>
+<li><a href="#clearing-alternative-executions">Clearing Alternative Executions</a></li>
+<li><a href="#redefinition">Redefinition</a></li>
</ul></li>
-</ul></li>
-<li><a href="#code-and-logic">Code and Logic</a></li>
-<li><a href="#do-something-with-these-components">do something with these components</a>
- * <a href="#execution">Execution</a>
- * <a href="#alternative-execution">Alternative Execution</a></li>
-<li><a href="#when-this-component-is-added-to-an-entity-this-system-will-be-called">When this Component is added to an Entity, this System will be called</a></li>
-<li><a href="#when-this-component-is-removed-from-an-entity-this-system-will-be-called">When this Component is removed from an Entity, this System will be called</a></li>
-<li><a href="#when-this-components-health-attribute-is-changed-this-system-will-be-called">When this Component&#39;s health attribute is changed, this System will be called</a></li>
-<li><a href="#when-a-component-from-this-component-manager-is-added-to-an-entity-this-system-will-be-called">When a Component from this Component Manager is added to an Entity, this System will be called</a></li>
-<li><a href="#when-a-component-from-this-component-manager-is-removed-from-an-entity-this-system-will-be-called">When a Component from this Component Manager is removed from an Entity, this System will be called</a></li>
-<li><a href="#when-this-components-health-attribute-from-this-component-manager-is-changed-this-system-will-be-called">When this Component&#39;s health attribute from this Component Manager is changed, this System will be called</a>
- * <a href="#clearing-alternative-executions">Clearing Alternative Executions</a></li>
-<li><a href="#clears-all-triggers-with-this-system">clears ALL triggers with this system</a></li>
-<li><a href="#clears-all-triggers-with-this-component-manager">clears ALL triggers with this Component Manager</a></li>
-<li><a href="#clear-the-trigger_when_added-for-this-component">clear the &#39;trigger_when_added&#39; for this Component</a></li>
-<li><a href="#clear-the-trigger_when_removed-for-this-component">clear the &#39;trigger_when_removed&#39; for this Component</a></li>
-<li><a href="#clear-the-trigger_when_is_set-for-this-component-specifically-for-the-health-attribute">clear the &#39;trigger_when_is_set&#39; for this Component specifically for the health attribute</a></li>
-<li><a href="#clears-all-triggers-with-this-component">clears ALL triggers with this Component</a></li>
-<li><a href="#clear-the-trigger_when_added-for-this-component-manager">clear the &#39;trigger_when_added&#39; for this Component Manager</a></li>
-<li><a href="#clear-the-trigger_when_removed-for-this-component-manager">clear the &#39;trigger_when_removed&#39; for this Component Manager</a></li>
-<li><a href="#clear-the-trigger_when_is_set-for-this-component-manager-specifically-for-the-health-attribute">clear the &#39;trigger_when_is_set&#39; for this Component Manager specifically for the health attribute</a>
- * <a href="#redefinition">Redefinition</a></li>
-<li><a href="#some-new-logic-or-code">Some new logic or code</a>
-
-<ul>
<li><a href="#scenes-1">Scenes</a>
<ul>
@@ -171,520 +144,413 @@
<h1 id="what-is-felecs">What is FelECS?</h1>
-<pre class="code ruby"><code class="ruby">FelECS is an ECS framework for developing games in the Ruby language. FelECS has been designed from the ground up with these three ideas in mind:
+<p>FelECS is an ECS framework for developing games in the Ruby language. FelECS has been designed from the ground up with these three ideas in mind:</p>
-1. **Engine Agnostic:** FelECS has been designed to be rendering engine agnostic as long as the target rendering engine is written in Ruby. This means that this framework can be dropped into existing rendering engines such as [Ruby2D](http://www.ruby2d.com) or [DRGTK](https://dragonruby.org/toolkit/game) with little modifications.
-2. **Easily Extensible:** FelECS has been designed such that extensions to its capabilities can be easily added. Extensions such as rendering engine wrappers, premade systems, premade components, etcetera can be easily coded and then distributed as gems.
-3. **Principle of (My) Least Astonishment:** I want to develop games using a language and framework I love and makes sense to me, inspired by the [Philosophy of the creator of Ruby](https://en.wikipedia.org/wiki/Ruby_(programming_language)#Philosophy).
-</code></pre>
+<ol>
+<li><strong>Engine Agnostic:</strong> FelECS has been designed to be rendering engine agnostic as long as the target rendering engine is written in Ruby. This means that this framework can be dropped into existing rendering engines such as <a href="http://www.ruby2d.com">Ruby2D</a> or <a href="https://dragonruby.org/toolkit/game">DRGTK</a> with little modifications.</li>
+<li><strong>Easily Extensible:</strong> FelECS has been designed such that extensions to its capabilities can be easily added. Extensions such as rendering engine wrappers, premade systems, premade components, etcetera can be easily coded and then distributed as gems.</li>
+<li><strong>Principle of (My) Least Astonishment:</strong> I want to develop games using a language and framework I love and makes sense to me, inspired by the <a href="https://en.wikipedia.org/wiki/Ruby_(programming_language)#Philosophy">Philosophy of the creator of Ruby</a>.</li>
+</ol>
<h1 id="what-is-ecs">What is ECS?</h1>
-<pre class="code ruby"><code class="ruby">ECS is a software architectural pattern that is used in video game development. Traditionally games were programmed using an object oriented method, while ECS instead attempts to program games using a data oriented method instead.
-ECS stands for Entity, Component, and System.
+<p>ECS is a software architectural pattern that is used in video game development. Traditionally games were programmed using an object oriented method, while ECS instead attempts to program games using a data oriented method instead.<br>
+ECS stands for Entity, Component, and System.</p>
----
-</code></pre>
+<hr>
<h3 id="components">Components</h3>
-<pre class="code ruby"><code class="ruby">This is where the data or information of a given &quot;object&quot; is stored. There is no logic or code here.
-</code></pre>
+<p>This is where the data or information of a given &quot;object&quot; is stored. There is no logic or code here. </p>
<h3 id="entities">Entities</h3>
-<pre class="code ruby"><code class="ruby">Entities will contain one or more Components, but contains no logic or data otherwise
-</code></pre>
+<p>Entities will contain one or more Components, but contains no logic or data otherwise</p>
<h3 id="systems">Systems</h3>
-<pre class="code ruby"><code class="ruby">Systems are where all the logic or code is kept. There is no data stored in here.
+<p>Systems are where all the logic or code is kept. There is no data stored in here.</p>
----
+<hr>
-By using this pattern it allows programmers to easily control what an &quot;object&quot; or entity can do and how much data it needs to have. It avoids the issue of inhertance as no inhertance is ever required in this system. If you need a certain entity to have a certain functionality you just add the relevant component to it, and the systems that automatically go over specific components will give your entitiy the desired functionality.
+<p>By using this pattern it allows programmers to easily control what an &quot;object&quot; or entity can do and how much data it needs to have. It avoids the issue of inhertance as no inhertance is ever required in this system. If you need a certain entity to have a certain functionality you just add the relevant component to it, and the systems that automatically go over specific components will give your entitiy the desired functionality. </p>
-**&quot;But your framework also has `Scenes`, `Stage`, and `Order`, what is that about?&quot;**
+<p><strong>&quot;But your framework also has <code>Scenes</code>, <code>Stage</code>, and <code>Order</code>, what is that about?&quot;</strong> </p>
----
-</code></pre>
+<hr>
<h3 id="scenes">Scenes</h3>
-<pre class="code ruby"><code class="ruby">Scenes are simply a collection or subset of Systems. This allows for an easy way to activate and deactivate Systems.
-</code></pre>
+<p>Scenes are simply a collection or subset of Systems. This allows for an easy way to activate and deactivate Systems.</p>
<h3 id="stage">Stage</h3>
-<pre class="code ruby"><code class="ruby">The Stage is Scenes which are activated. This means any Scenes on the Stage are executed each frame, while the rest of the Systems are not.
-</code></pre>
+<p>The Stage is Scenes which are activated. This means any Scenes on the Stage are executed each frame, while the rest of the Systems are not.</p>
<h3 id="order">Order</h3>
-<pre class="code ruby"><code class="ruby">Order is a helper class which can set the priority of Scenes and Systems.
+<p>Order is a helper class which can set the priority of Scenes and Systems.</p>
----
-</code></pre>
+<hr>
<h1 id="usage">Usage</h1>
-<pre class="code ruby"><code class="ruby">There are 2 ways of using FelECS. You can either `include` it as a gem in your project if your game engine supports this. The other option is to download the single file export of FelECS and then `require_relative` 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>There are 2 ways of using FelECS. 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 FelECS 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>
-To use the gem method you can do the following: install the gem using `gem install felflame` or using bundler `bundle add felflame` and then require it in your project like so: `require &#39;felflame&#39;`.
+<p>To use the gem method you can do the following: install the gem using <code>gem install felecs</code> or using bundler <code>bundle add felecs</code> and then require it in your project like so: <code>require &#39;felecs&#39;</code>.</p>
-To use the single file export method you simply download the felflame.rb file from the [releases page on Github](https://github.com/realtradam/FelECS/releases) and add it to your source folder and add a `require relative &#39;felflame.rb&#39;` line or wherever you have placed the file to use it.
-</code></pre>
+<p>To use the single file export method you simply download the felecs.rb file from the <a href="https://github.com/realtradam/FelECS/releases">releases page on Github</a> and add it to your source folder and add a <code>require relative &#39;felecs.rb&#39;</code> line or wherever you have placed the file to use it.</p>
<h2 id="entities">Entities</h2>
<h3 id="creation">Creation</h3>
-<pre class="code ruby"><code class="ruby">Entities are essentially &quot;objects&quot; in the game world. To create a new Entity we do the following:
-
-```ruby
-@entity = FelECS::Entities.new
-```
-or if we want to add (any number of)components to it when creating it:
+<p>Entities are essentially &quot;objects&quot; in the game world. To create a new Entity we do the following:</p>
-```ruby
+<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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Entities.html" title="FelECS::Entities (class)">Entities</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FelECS/Entities.html#initialize-instance_method" title="FelECS::Entities#initialize (method)">new</a></span></span>
</code></pre>
-<p>@entity = FelECS::Entites.new(
- FelECS::Components::Health.new,
- @component,
- FelECS::Components::EnemyTeam.first
- )
- ```</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="FelECS.html" title="FelECS (module)">FelECS</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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::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>
-<pre class="code ruby"><code class="ruby">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 `Entities` module:
+<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>
-```ruby
-@entity = FelECS::Entities[2]
-@entity = FelECS::Entities.first
-@entity = FelECS::Entities.each # you can iterate over all entities this way. Any valid array method can be used
-```
-</code></pre>
+<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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Entities.html" title="FelECS::Entities (class)">Entities</a></span></span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span>
+<span class='ivar'>@entity</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Entities.html" title="FelECS::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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Entities.html" title="FelECS::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>
-<pre class="code ruby"><code class="ruby">We can still add or remove Components from an Entity after it has been created. Here is how:
+<p>We can still add or remove Components from an Entity after it has been created. Here is how:</p>
-```ruby
-```
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span> <span class='ivar'>@component</span>
+<span class='ivar'>@entity</span><span class='period'>.</span><span class='id identifier rubyid_remove'>remove</span> <span class='ivar'>@component</span>
</code></pre>
<h3 id="accessing-entities-attached-components">Accessing Entities&#39; Attached Components</h3>
-<pre class="code ruby"><code class="ruby">This is the most common way of accessing an Entity
+<p>This is the most common way of accessing an Entity</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>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>
-```ruby
[email protected][@component_manager] # =&gt; [@component1, @component2, @component3]
-```
-</code></pre>
+<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'># =&gt; [@component1, @component2, @component3]
+</span></code></pre>
<h3 id="deletion">Deletion</h3>
-<pre class="code ruby"><code class="ruby">To have all Components from an Entity **removed** and the Entity deleted we do the following:
+<p>To have all Components from an Entity <strong>removed</strong> and the Entity deleted we do the following:</p>
-NOTE: The components will **not be deleted**. They are simply **removed** 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>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>
-```ruby
-```
+<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>
<h2 id="components">Components</h2>
<h3 id="creating-a-component-manager">Creating a Component Manager</h3>
-<pre class="code ruby"><code class="ruby">Components are where all the data is stored. The data is stored in variables or accessors in each component.
-These accessors and their defaults are configured when a component manager is created, like so:
+<p>Components are where all the data is stored. The data is stored in variables or accessors in each component.
+These accessors and their defaults are configured when a component manager is created, like so:</p>
-```ruby
-@component_manager = FelECS::Components.new(&#39;Stats&#39;, :armour, hp: 100)
-```
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@component_manager</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FelECS/Components.html#new-class_method" title="FelECS::Components.new (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Stats</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='symbol'>:armour</span><span class='comma'>,</span> <span class='label'>hp:</span> <span class='int'>100</span><span class='rparen'>)</span>
+</code></pre>
-In this example we created a component manager called &quot;Stats&quot;.
+<p>In this example we created a component manager called &quot;Stats&quot;.
The name given to component managers must follow the same rules for naming constants in ruby for a reason you will shortly see.
The parameters following are all creating the attributes we can set.
We can set any number of parameters we wish, in this example we define two.
-The `:armour` parameter is being created without a default, it will equal to `nil` when a new component is created, while `hp` will be equal to 100 when a component is created.
-When defining attributes symbols should be used.
-</code></pre>
+The <code>:armour</code> parameter is being created without a default, it will equal to <code>nil</code> when a new component is created, while <code>hp</code> will be equal to 100 when a component is created.
+When defining attributes symbols should be used.</p>
<h3 id="creating-a-component-from-a-component-manager">Creating a Component from a Component Manager</h3>
-<pre class="code ruby"><code class="ruby">Now that we have a component manager we can make components from it like so:
+<p>Now that we have a component manager we can make components from it like so:</p>
-```ruby
-@component = FelECS::Components::Stats.new
-```
+<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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::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>
-Or we can even override the defaults when creating the component:
+<p>Or we can even override the defaults when creating the component:</p>
-```ruby
-@component = FelECS::Components::Stats.new(armour: &#39;steel&#39;)
-```
+<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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::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'>&#39;</span><span class='tstring_content'>steel</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
</code></pre>
<h3 id="accessing">Accessing</h3>
-<pre class="code ruby"><code class="ruby">You can access components using any array method.
+<p>You can access components using any array method.</p>
-```ruby
-@component = FelECS::Components::Stats[2]
-@component = FelECS::Components::Stats.first
-@component = FelECS::Components::Stats.each # you can use iterators this way
-```
-</code></pre>
+<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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::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='op'>=</span> <span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::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>
-<pre class="code ruby"><code class="ruby">There are a few different ways we can read or change the attributes of a component depending on what our needs are.
-Here are the ways to edit attrubutes, followed by the ways to read them.
-```ruby
[email protected] = &#39;Mythril&#39;
[email protected]_attrs(armour: &#39;Leather&#39;, hp: 95)
-```
-```ruby
[email protected]_h # =&gt; {armour: &#39;Leather&#39;, hp: 95}
-```
+<p>There are a few different ways we can read or change the attributes of a component depending on what our needs are.
+Here are the ways to edit attrubutes, followed by the ways to read them.</p>
+
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_armour'>armour</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Mythril</span><span class='tstring_end'>&#39;</span></span>
+<span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_update_attrs'>update_attrs</span><span class='lparen'>(</span><span class='label'>armour:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Leather</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>hp:</span> <span class='int'>95</span><span class='rparen'>)</span>
</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'># =&gt; 95
+</span><span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_to_h'>to_h</span> <span class='comment'># =&gt; {armour: &#39;Leather&#39;, hp: 95}
+</span></code></pre>
+
<h3 id="deleting-components">Deleting Components</h3>
-<pre class="code ruby"><code class="ruby">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>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>
-```ruby
-```
+<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="accessing-components-attached-entities">Accessing Components&#39; attached Entities</h3>
-<pre class="code ruby"><code class="ruby">Components also keep track of what Entities are using it. To access this list we do the following:
+<p>Components also keep track of what Entities are using it. To access this list we do the following:</p>
-```ruby
[email protected] # =&gt; [@entity1, @entity2, @entity3]
-</code></pre>
-
-<h1 id="get-the-first-entity-attached">get the first entity attached.</h1>
-
-<h1 id="this-will-throw-a-warning-if-there-is-more-or-less-then">this will throw a warning if there is more or less then</h1>
-
-<h1 id="exactly-one-entity">exactly one entity</h1>
-
-<pre class="code ruby"><code class="ruby">@component.entity # =&gt; @entity
-```
-</code></pre>
+<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'># =&gt; [@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'># =&gt; @entity
+</span></code></pre>
<h2 id="systems">Systems</h2>
<h3 id="creation">Creation</h3>
-<pre class="code ruby"><code class="ruby">We can create Systems like so:
+<p>We can create Systems like so:</p>
-```ruby
-FelECS::Systems.new(&#39;Render&#39;, priority: 2) do
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FelECS/Systems.html#initialize-instance_method" title="FelECS::Systems#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Render</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>priority:</span> <span class='int'>2</span><span class='rparen'>)</span> <span class='kw'>do</span>
+ <span class='comment'># Code and Logic
+</span><span class='kw'>end</span>
</code></pre>
-<h1 id="code-and-logic">Code and Logic</h1>
-
-<pre class="code ruby"><code class="ruby">end
-```
+<p>The name we assign is how we can access the System, like so:</p>
-The name we assign is how we can access the System, like so:
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>Render</span>
+</code></pre>
-```ruby
-FelECS::Systems::Render
-```
-Priority determines the order Systems should be executed, this is used for `Scenes` and the `Stage`.
+<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.
+E.g priority 1 will go first, priority 2 will go second, etcetera. </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>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>
-Often we will want to execute some logic on each Component in a given Component Manager so our code might look like this:
+<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>
-```ruby
-FelECS::Systems.new(&#39;Render&#39;, priority: 2) do
-FelECS::Components::Sprites.each do |component|
-</code></pre>
-
-<h1 id="do-something-with-these-components">do something with these components</h1>
-
-<pre class="code ruby"><code class="ruby">end
-end
-```
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FelECS/Systems.html#initialize-instance_method" title="FelECS::Systems#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Render</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>priority:</span> <span class='int'>2</span><span class='rparen'>)</span> <span class='kw'>do</span>
+ <span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::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 these components
+</span> <span class='kw'>end</span>
+<span class='kw'>end</span>
</code></pre>
<h3 id="execution">Execution</h3>
-<pre class="code ruby"><code class="ruby">After we create a System, it won&#39;t do anything on its own until we tell it to. Here is how:
-
-```ruby
-FelECS::Systems::Render.call
-```
-
-Sometimes you might want to manually activate a System, but the more common way to have Systems be triggered is to use Scenes and the Stage or the alternative ways of execution.
-</code></pre>
-
-<h3 id="alternative-execution">Alternative Execution</h3>
-
-<pre class="code ruby"><code class="ruby">Sometimes you want a System to automatically trigger when a special even happens. FelECS can keep track of when a Component is added, removed, or when an attribute is changed and then execute Systems linked to these events. Here is how to create these links:
+<p>After we create a System, it won&#39;t do anything on its own until we tell it to. Here is how:</p>
-```ruby
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>Render</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
</code></pre>
-<h1 id="when-this-component-is-added-to-an-entity-this-system-will-be-called">When this Component is added to an Entity, this System will be called</h1>
-
-<p>FelECS::Systems::PassiveRegen.trigger_when_added(@component)</p>
+<p>Sometimes you might want to manually activate a System, but the more common way to have Systems be triggered is to use Scenes and the Stage or the alternative ways of execution.</p>
-<h1 id="when-this-component-is-removed-from-an-entity-this-system-will-be-called">When this Component is removed from an Entity, this System will be called</h1>
-
-<p>FelECS::Systems::PassiveRegen.trigger_when_removed(@component)</p>
+<h3 id="alternative-execution">Alternative Execution</h3>
-<h1 id="when-this-components-health-attribute-is-changed-this-system-will-be-called">When this Component&#39;s health attribute is changed, this System will be called</h1>
+<p>Sometimes you want a System to automatically trigger when a special even happens. FelECS can keep track of when a Component is added, removed, or when an attribute is changed and then execute Systems linked to these events. Here is how to create these links:</p>
-<p>FelECS::Systems::PassiveRegen.trigger_when_is_set(@component, :health)
- ```</p>
+<pre class="code ruby"><code class="ruby"><span class='comment'># When this Component is added to an Entity, this System will be called
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_added'>trigger_when_added</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='rparen'>)</span>
-<pre class="code ruby"><code class="ruby">If we want these triggers to happen for all Components that belong to specific Component Manager then we can do that instead:
+<span class='comment'># When this Component is removed from an Entity, this System will be called
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_removed'>trigger_when_removed</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='rparen'>)</span>
-```ruby
+<span class='comment'># When this Component&#39;s health attribute is changed, this System will be called
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_is_changed'>trigger_when_is_changed</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='comma'>,</span> <span class='symbol'>:health</span><span class='rparen'>)</span>
</code></pre>
-<h1 id="when-a-component-from-this-component-manager-is-added-to-an-entity-this-system-will-be-called">When a Component from this Component Manager is added to an Entity, this System will be called</h1>
+<p>If we want these triggers to happen for all Components that belong to specific Component Manager then we can do that instead:</p>
-<p>FelECS::Systems::PassiveRegen.trigger_when_added(@component_manager)</p>
+<pre class="code ruby"><code class="ruby"><span class='comment'># When a Component from this Component Manager is added to an Entity, this System will be called
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_added'>trigger_when_added</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='rparen'>)</span>
-<h1 id="when-a-component-from-this-component-manager-is-removed-from-an-entity-this-system-will-be-called">When a Component from this Component Manager is removed from an Entity, this System will be called</h1>
+<span class='comment'># When a Component from this Component Manager is removed from an Entity, this System will be called
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_removed'>trigger_when_removed</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='rparen'>)</span>
-<p>FelECS::Systems::PassiveRegen.trigger_when_removed(@component_manager)</p>
-
-<h1 id="when-this-components-health-attribute-from-this-component-manager-is-changed-this-system-will-be-called">When this Component&#39;s health attribute from this Component Manager is changed, this System will be called</h1>
-
-<p>FelECS::Systems::PassiveRegen.trigger_when_is_set(@component_manager, :health)
- ```</p>
-
-<pre class="code ruby"><code class="ruby">We can create any number of these links between Systems, Components, and Component Manangers as we like, simply call the method again with our other Components and Component Managers
-</code></pre>
-
-<h3 id="clearing-alternative-executions">Clearing Alternative Executions</h3>
-
-<pre class="code ruby"><code class="ruby">If we wish to remove these links that we created, we can do that using the follwing function in any of the following ways:
-
-```ruby
+<span class='comment'># When this Component&#39;s health attribute from this Component Manager is changed, this System will be called
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_is_changed'>trigger_when_is_changed</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='comma'>,</span> <span class='symbol'>:health</span><span class='rparen'>)</span>
</code></pre>
-<h1 id="clears-all-triggers-with-this-system">clears ALL triggers with this system</h1>
-
-<pre class="code ruby"><code class="ruby"><span class='const'>FelECS</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span>
-</code></pre>
+<p>We can create any number of these links between Systems, Components, and Component Manangers as we like, simply call the method again with our other Components and Component Managers</p>
-<h1 id="clears-all-triggers-with-this-component-manager">clears ALL triggers with this Component Manager</h1>
-
-<p>FelECS::Systems::PassiveRegen.clear_triggers(@component)</p>
-
-<h1 id="clear-the-trigger_when_added-for-this-component">clear the &#39;trigger_when_added&#39; for this Component</h1>
-
-<p>FelECS::Systems::PassiveRegen.clear_triggers(@component, :added)</p>
+<h3 id="clearing-alternative-executions">Clearing Alternative Executions</h3>
-<h1 id="clear-the-trigger_when_removed-for-this-component">clear the &#39;trigger_when_removed&#39; for this Component</h1>
+<p>If we wish to remove these links that we created, we can do that using the follwing function in any of the following ways:</p>
-<p>FelECS::Systems::PassiveRegen.clear_triggers(@component, :removed)</p>
+<pre class="code ruby"><code class="ruby"><span class='comment'># clears ALL triggers with this system
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span>
-<h1 id="clear-the-trigger_when_is_set-for-this-component-specifically-for-the-health-attribute">clear the &#39;trigger_when_is_set&#39; for this Component specifically for the health attribute</h1>
+<span class='comment'># clears ALL triggers with this Component Manager
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='rparen'>)</span>
-<p>FelECS::Systems::PassiveRegen.clear_triggers(@component, :is_set, :health)
- ```</p>
+<span class='comment'># clear the &#39;trigger_when_added&#39; for this Component
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='comma'>,</span> <span class='symbol'>:added</span><span class='rparen'>)</span>
-<pre class="code ruby"><code class="ruby">Likewise we can do the same with Component Managers:
+<span class='comment'># clear the &#39;trigger_when_removed&#39; for this Component
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='comma'>,</span> <span class='symbol'>:removed</span><span class='rparen'>)</span>
-```ruby
+<span class='comment'># clear the &#39;trigger_when_is_changed&#39; for this Component specifically for the health attribute
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='comma'>,</span> <span class='symbol'>:is_set</span><span class='comma'>,</span> <span class='symbol'>:health</span><span class='rparen'>)</span>
</code></pre>
-<h1 id="clears-all-triggers-with-this-component">clears ALL triggers with this Component</h1>
-
-<p>FelECS::Systems::PassiveRegen.clear_triggers(@component_manager) </p>
+<p>Likewise we can do the same with Component Managers:</p>
-<h1 id="clear-the-trigger_when_added-for-this-component-manager">clear the &#39;trigger_when_added&#39; for this Component Manager</h1>
+<pre class="code ruby"><code class="ruby"><span class='comment'># clears ALL triggers with this Component
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='rparen'>)</span>
-<p>FelECS::Systems::PassiveRegen.clear_triggers(@component_manager, :added) </p>
+<span class='comment'># clear the &#39;trigger_when_added&#39; for this Component Manager
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='comma'>,</span> <span class='symbol'>:added</span><span class='rparen'>)</span>
-<h1 id="clear-the-trigger_when_removed-for-this-component-manager">clear the &#39;trigger_when_removed&#39; for this Component Manager</h1>
+<span class='comment'># clear the &#39;trigger_when_removed&#39; for this Component Manager
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='comma'>,</span> <span class='symbol'>:removed</span><span class='rparen'>)</span>
-<p>FelECS::Systems::PassiveRegen.clear_triggers(@component_manager, :removed) </p>
-
-<h1 id="clear-the-trigger_when_is_set-for-this-component-manager-specifically-for-the-health-attribute">clear the &#39;trigger_when_is_set&#39; for this Component Manager specifically for the health attribute</h1>
-
-<p>FelECS::Systems::PassiveRegen.clear_triggers(@component_manager, :is_set, :health)
- ```</p>
+<span class='comment'># clear the &#39;trigger_when_is_changed&#39; for this Component Manager specifically for the health attribute
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='comma'>,</span> <span class='symbol'>:is_set</span><span class='comma'>,</span> <span class='symbol'>:health</span><span class='rparen'>)</span>
+</code></pre>
<h3 id="redefinition">Redefinition</h3>
-<pre class="code ruby"><code class="ruby">If we wanted to change what code or logic a given System executes, we could do that with:
+<p>If we wanted to change what code or logic a given System executes, we could do that with:</p>
-```ruby
-FelECS::Systems::PassiveRegen.redefine do
-</code></pre>
-
-<h1 id="some-new-logic-or-code">Some new logic or code</h1>
-
-<pre class="code ruby"><code class="ruby">end
-```
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_redefine'>redefine</span> <span class='kw'>do</span>
+ <span class='comment'># Some new logic or code
+</span><span class='kw'>end</span>
</code></pre>
<h2 id="scenes">Scenes</h2>
<h3 id="creation">Creation</h3>
-<pre class="code ruby"><code class="ruby">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 [Alternative Executions](#alternative-execution) will occur even if they are not part of a Scene. Here is how we make a new Scene:
+<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>
-```ruby
-@scene = FelECS::Scenes.new(&#39;ExampleScene&#39;, priority: 5)
-```
+<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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Scenes.html" title="FelECS::Scenes (class)">Scenes</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FelECS/Scenes.html#initialize-instance_method" title="FelECS::Scenes#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ExampleScene</span><span class='tstring_end'>&#39;</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>
-<pre class="code ruby"><code class="ruby">Just like other classes in FelECS, the name we gave the Scene is how we access it:
+<p>Just like other classes in FelECS, the name we gave the Scene is how we access it:</p>
-```ruby
-@scene = FelECS::Scenes::ExampleScene
-```
+<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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Scenes.html" title="FelECS::Scenes (class)">Scenes</a></span></span><span class='op'>::</span><span class='const'>ExampleScene</span>
</code></pre>
<h3 id="adding-systems">Adding Systems</h3>
-<pre class="code ruby"><code class="ruby">Adding Systems is simple. We can add as many as we want. In this example we add 3 different systems:
+<p>Adding Systems is simple. We can add as many as we want. In this example we add 3 different systems:</p>
-```ruby
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Scenes.html" title="FelECS::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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::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>
-<p>FelECS::Scenes::ExampleScene.add(
- FelECS::Systems::Render,
- @system2,
- @system3
- )
- ```</p>
-
<h3 id="removing-systems">Removing Systems</h3>
-<pre class="code ruby"><code class="ruby">Removing Systems works similarly:
+<p>Removing Systems works similarly:</p>
-```ruby
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Scenes.html" title="FelECS::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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::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>
-<p>FelECS::Scenes::ExampleScene.remove(
- FelECS::Systems::Render,
- @system2,
- @system3
- )
- ```</p>
-
<h3 id="clearing">Clearing</h3>
-<pre class="code ruby"><code class="ruby">If you want to remove all Systems from a Scene here is how we do it:
+<p>If you want to remove all Systems from a Scene here is how we do it:</p>
-```ruby
-```
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@scene</span><span class='period'>.</span><span class='id identifier rubyid_clear'>clear</span>
</code></pre>
<h3 id="execution">Execution</h3>
-<pre class="code ruby"><code class="ruby">To execute all Systems within a scene once we can just do:
+<p>To execute all Systems within a scene once we can just do:</p>
-```ruby
-```
-
-The Scene will make sure that the systems are executed in the correct order based on their given priorities
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@scene</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
</code></pre>
+<p>The Scene will make sure that the systems are executed in the correct order based on their given priorities</p>
+
<h2 id="stage">Stage</h2>
<h3 id="adding-scenes">Adding Scenes</h3>
-<pre class="code ruby"><code class="ruby">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 &#39;active&#39;. To add a Scene we do the following:
+<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 &#39;active&#39;. To add a Scene we do the following:</p>
-```ruby
-FelECS::Stage.add FelECS::Scene::ExampleScene
-```
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Stage.html" title="FelECS::Stage (module)">Stage</a></span></span><span class='period'>.</span><span class='id identifier rubyid_add'><span class='object_link'><a href="FelECS/Stage.html#add-class_method" title="FelECS::Stage.add (method)">add</a></span></span> <span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'>Scene</span><span class='op'>::</span><span class='const'>ExampleScene</span>
</code></pre>
<h3 id="removing-scenes">Removing Scenes</h3>
-<pre class="code ruby"><code class="ruby">Likewise we can remove Scenes:
+<p>Likewise we can remove Scenes:</p>
-```ruby
-FelECS::Stage.remove FelECS::Scene::ExampleScene
-```
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Stage.html" title="FelECS::Stage (module)">Stage</a></span></span><span class='period'>.</span><span class='id identifier rubyid_remove'><span class='object_link'><a href="FelECS/Stage.html#remove-class_method" title="FelECS::Stage.remove (method)">remove</a></span></span> <span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'>Scene</span><span class='op'>::</span><span class='const'>ExampleScene</span>
</code></pre>
<h3 id="executing">Executing</h3>
-<pre class="code ruby"><code class="ruby">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>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>
-```ruby
-FelECS::Stage.call
-```
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Stage.html" title="FelECS::Stage (module)">Stage</a></span></span><span class='period'>.</span><span class='id identifier rubyid_call'><span class='object_link'><a href="FelECS/Stage.html#call-class_method" title="FelECS::Stage.call (method)">call</a></span></span>
</code></pre>
<h2 id="order">Order</h2>
<h3 id="setting-the-order">Setting the order</h3>
-<pre class="code ruby"><code class="ruby">To set the order you just need to call `FelECS::Order.sort` and pass Scenes or Systems in the parameters in the order you wish for them to execute
+<p>To set the order you just need to call <code>FelECS::Order.sort</code> and pass Scenes or Systems in the parameters in the order you wish for them to execute</p>
-```ruby
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Order.html" title="FelECS::Order (module)">Order</a></span></span><span class='period'>.</span><span class='id identifier rubyid_sort'><span class='object_link'><a href="FelECS/Order.html#sort-class_method" title="FelECS::Order.sort (method)">sort</a></span></span><span class='lparen'>(</span>
+ <span class='ivar'>@system1</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>
-<p>FelECS::Order.sort(
- @system1,
- @system2,
- @system3
- )
- ```</p>
+<p>If you want some Scenes or Systems to have the same priority then just pass them as an array:</p>
-<pre class="code ruby"><code class="ruby">If you want some Scenes or Systems to have the same priority then just pass them as an array:
-
-```ruby
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Order.html" title="FelECS::Order (module)">Order</a></span></span><span class='period'>.</span><span class='id identifier rubyid_sort'><span class='object_link'><a href="FelECS/Order.html#sort-class_method" title="FelECS::Order.sort (method)">sort</a></span></span><span class='lparen'>(</span>
+ <span class='ivar'>@scene1</span><span class='comma'>,</span>
+ <span class='lbracket'>[</span><span class='ivar'>@scene2_1</span><span class='comma'>,</span> <span class='ivar'>@scene2_2</span><span class='rbracket'>]</span><span class='comma'>,</span>
+ <span class='ivar'>@scene3</span>
+<span class='rparen'>)</span>
</code></pre>
-<p>FelECS::Order.sort(
- @scene1,
- [@scene2_1, @scene2_2],
- @scene3
- )
- ```</p>
-
<h2 id="closing-notes">Closing Notes</h2>
-<pre class="code ruby"><code class="ruby">There are some methods I haven&#39;t gone over in the overview. If you want to see everything and read in more detail check out the [Documentation](https://felflame.tradam.fyi)!
-</code></pre>
+<p>There are some methods I haven&#39;t gone over in the overview. If you want to see everything and read in more detail check out the <a href="https://felflame.tradam.fyi">Documentation</a>!</p>
<h1 id="contribution">Contribution</h1>
-<pre class="code ruby"><code class="ruby">Contributors are welcome! I am always looking to impove the capabilities of game development in Ruby. Feel free to open an issue to discuss a proposed changed or fix. To code a change or fix first fork the project. Next write your changes or fixes. Make sure all your changes and fixes are properly documented using Yard(I will not merge if it is not 100% documented) and make sure everything has tests written for it with Rspec(I will also not merge if it does not have 100% test coverage). Once you have your changes made then simply make a pull request.
+<p>Contributors are welcome! I am always looking to impove the capabilities of game development in Ruby. Feel free to open an issue to discuss a proposed changed or fix. To code a change or fix first fork the project. Next write your changes or fixes. Make sure all your changes and fixes are properly documented using Yard(I will not merge if it is not 100% documented) and make sure everything has tests written for it with Rspec(I will also not merge if it does not have 100% test coverage). Once you have your changes made then simply make a pull request. </p>
-If you need help writing documentation or tests feel free to ask!
+<p>If you need help writing documentation or tests feel free to ask! </p>
-If you want to contribute to development with a thanks you can always [buy me a coffee ;^)](https://ko-fi.com/tradam)
-</code></pre>
+<p>If you want to contribute to development with a thanks you can always <a href="https://ko-fi.com/tradam">buy me a coffee ;^)</a></p>
</div></div>
<div id="footer">
- Generated on Thu Jan 20 22:40:31 2022 by
+ Generated on Fri Jan 28 16:21:20 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 e81dd9d..fedf740 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -59,12 +59,12 @@
<div id="content"><div id='filecontents'><p><img src="https://raw.githubusercontent.com/realtradam/FelECS/master/logos/felecs-logo-text.png" alt="FelECS"></p>
-<!-- ![FelECS](https://filestorage.catgirls.rodeo/images/felflame-logo-smaller-text.png) -->
+<!-- ![FelFlame](https://filestorage.catgirls.rodeo/images/felecs-logo-smaller-text.png) -->
-<p><a href="https://codeclimate.com/github/realtradam/FelECS/maintainability"><img src="https://api.codeclimate.com/v1/badges/56d425d9078e98efb74b/maintainability" alt="Maintainability"></a>
-<a href="https://codeclimate.com/github/realtradam/FelECS/test_coverage"><img src="https://api.codeclimate.com/v1/badges/56d425d9078e98efb74b/test_coverage" alt="Test Coverage"></a>
+<p><a href="https://codeclimate.com/github/realtradam/FelFlame/maintainability"><img src="https://api.codeclimate.com/v1/badges/56d425d9078e98efb74b/maintainability" alt="Maintainability"></a>
+<a href="https://codeclimate.com/github/realtradam/FelFlame/test_coverage"><img src="https://api.codeclimate.com/v1/badges/56d425d9078e98efb74b/test_coverage" alt="Test Coverage"></a>
<a href="http://inch-ci.org/github/realtradam/FelECS"><img src="http://inch-ci.org/github/realtradam/FelECS.svg?branch=master" alt="Inline docs"></a>
-<a href="https://github.com/realtradam/FelECS/blob/master/LICENSE"><img src="https://img.shields.io/github/license/realtradam/FelECS?label=license&style=flat" alt="MIT License"></a>
+<a href="https://github.com/realtradam/FelFlame/blob/master/LICENSE"><img src="https://img.shields.io/github/license/realtradam/FelECS" alt="MIT License"></a>
<a href="https://ko-fi.com/tradam"><img src="https://img.shields.io/static/v1?message=Buy%20me%20a%20coffee&logo=kofi&labelColor=ff5e5b&color=434B57&logoColor=white&label=%20" alt="Ko-Fi"></a></p>
<p><strong><a href="https://felflame.tradam.fyi/">Check out the comprehensive documentation here!</a></strong></p>
@@ -104,42 +104,15 @@
<li><a href="#deleting-components">Deleting Components</a></li>
<li><a href="#accessing-components-attached-entities">Accessing Components&#39; attached Entities</a></li>
</ul></li>
-</ul></li>
-<li><a href="#get-the-first-entity-attached">get the first entity attached.</a></li>
-<li><a href="#this-will-throw-a-warning-if-there-is-more-or-less-then">this will throw a warning if there is more or less then</a></li>
-<li><a href="#exactly-one-entity">exactly one entity</a>
-
-<ul>
<li><a href="#systems-1">Systems</a>
<ul>
<li><a href="#creation-1">Creation</a></li>
+<li><a href="#execution">Execution</a></li>
+<li><a href="#alternative-execution">Alternative Execution</a></li>
+<li><a href="#clearing-alternative-executions">Clearing Alternative Executions</a></li>
+<li><a href="#redefinition">Redefinition</a></li>
</ul></li>
-</ul></li>
-<li><a href="#code-and-logic">Code and Logic</a></li>
-<li><a href="#do-something-with-these-components">do something with these components</a>
- * <a href="#execution">Execution</a>
- * <a href="#alternative-execution">Alternative Execution</a></li>
-<li><a href="#when-this-component-is-added-to-an-entity-this-system-will-be-called">When this Component is added to an Entity, this System will be called</a></li>
-<li><a href="#when-this-component-is-removed-from-an-entity-this-system-will-be-called">When this Component is removed from an Entity, this System will be called</a></li>
-<li><a href="#when-this-components-health-attribute-is-changed-this-system-will-be-called">When this Component&#39;s health attribute is changed, this System will be called</a></li>
-<li><a href="#when-a-component-from-this-component-manager-is-added-to-an-entity-this-system-will-be-called">When a Component from this Component Manager is added to an Entity, this System will be called</a></li>
-<li><a href="#when-a-component-from-this-component-manager-is-removed-from-an-entity-this-system-will-be-called">When a Component from this Component Manager is removed from an Entity, this System will be called</a></li>
-<li><a href="#when-this-components-health-attribute-from-this-component-manager-is-changed-this-system-will-be-called">When this Component&#39;s health attribute from this Component Manager is changed, this System will be called</a>
- * <a href="#clearing-alternative-executions">Clearing Alternative Executions</a></li>
-<li><a href="#clears-all-triggers-with-this-system">clears ALL triggers with this system</a></li>
-<li><a href="#clears-all-triggers-with-this-component-manager">clears ALL triggers with this Component Manager</a></li>
-<li><a href="#clear-the-trigger_when_added-for-this-component">clear the &#39;trigger_when_added&#39; for this Component</a></li>
-<li><a href="#clear-the-trigger_when_removed-for-this-component">clear the &#39;trigger_when_removed&#39; for this Component</a></li>
-<li><a href="#clear-the-trigger_when_is_set-for-this-component-specifically-for-the-health-attribute">clear the &#39;trigger_when_is_set&#39; for this Component specifically for the health attribute</a></li>
-<li><a href="#clears-all-triggers-with-this-component">clears ALL triggers with this Component</a></li>
-<li><a href="#clear-the-trigger_when_added-for-this-component-manager">clear the &#39;trigger_when_added&#39; for this Component Manager</a></li>
-<li><a href="#clear-the-trigger_when_removed-for-this-component-manager">clear the &#39;trigger_when_removed&#39; for this Component Manager</a></li>
-<li><a href="#clear-the-trigger_when_is_set-for-this-component-manager-specifically-for-the-health-attribute">clear the &#39;trigger_when_is_set&#39; for this Component Manager specifically for the health attribute</a>
- * <a href="#redefinition">Redefinition</a></li>
-<li><a href="#some-new-logic-or-code">Some new logic or code</a>
-
-<ul>
<li><a href="#scenes-1">Scenes</a>
<ul>
@@ -171,520 +144,413 @@
<h1 id="what-is-felecs">What is FelECS?</h1>
-<pre class="code ruby"><code class="ruby">FelECS is an ECS framework for developing games in the Ruby language. FelECS has been designed from the ground up with these three ideas in mind:
+<p>FelECS is an ECS framework for developing games in the Ruby language. FelECS has been designed from the ground up with these three ideas in mind:</p>
-1. **Engine Agnostic:** FelECS has been designed to be rendering engine agnostic as long as the target rendering engine is written in Ruby. This means that this framework can be dropped into existing rendering engines such as [Ruby2D](http://www.ruby2d.com) or [DRGTK](https://dragonruby.org/toolkit/game) with little modifications.
-2. **Easily Extensible:** FelECS has been designed such that extensions to its capabilities can be easily added. Extensions such as rendering engine wrappers, premade systems, premade components, etcetera can be easily coded and then distributed as gems.
-3. **Principle of (My) Least Astonishment:** I want to develop games using a language and framework I love and makes sense to me, inspired by the [Philosophy of the creator of Ruby](https://en.wikipedia.org/wiki/Ruby_(programming_language)#Philosophy).
-</code></pre>
+<ol>
+<li><strong>Engine Agnostic:</strong> FelECS has been designed to be rendering engine agnostic as long as the target rendering engine is written in Ruby. This means that this framework can be dropped into existing rendering engines such as <a href="http://www.ruby2d.com">Ruby2D</a> or <a href="https://dragonruby.org/toolkit/game">DRGTK</a> with little modifications.</li>
+<li><strong>Easily Extensible:</strong> FelECS has been designed such that extensions to its capabilities can be easily added. Extensions such as rendering engine wrappers, premade systems, premade components, etcetera can be easily coded and then distributed as gems.</li>
+<li><strong>Principle of (My) Least Astonishment:</strong> I want to develop games using a language and framework I love and makes sense to me, inspired by the <a href="https://en.wikipedia.org/wiki/Ruby_(programming_language)#Philosophy">Philosophy of the creator of Ruby</a>.</li>
+</ol>
<h1 id="what-is-ecs">What is ECS?</h1>
-<pre class="code ruby"><code class="ruby">ECS is a software architectural pattern that is used in video game development. Traditionally games were programmed using an object oriented method, while ECS instead attempts to program games using a data oriented method instead.
-ECS stands for Entity, Component, and System.
+<p>ECS is a software architectural pattern that is used in video game development. Traditionally games were programmed using an object oriented method, while ECS instead attempts to program games using a data oriented method instead.<br>
+ECS stands for Entity, Component, and System.</p>
----
-</code></pre>
+<hr>
<h3 id="components">Components</h3>
-<pre class="code ruby"><code class="ruby">This is where the data or information of a given &quot;object&quot; is stored. There is no logic or code here.
-</code></pre>
+<p>This is where the data or information of a given &quot;object&quot; is stored. There is no logic or code here. </p>
<h3 id="entities">Entities</h3>
-<pre class="code ruby"><code class="ruby">Entities will contain one or more Components, but contains no logic or data otherwise
-</code></pre>
+<p>Entities will contain one or more Components, but contains no logic or data otherwise</p>
<h3 id="systems">Systems</h3>
-<pre class="code ruby"><code class="ruby">Systems are where all the logic or code is kept. There is no data stored in here.
+<p>Systems are where all the logic or code is kept. There is no data stored in here.</p>
----
+<hr>
-By using this pattern it allows programmers to easily control what an &quot;object&quot; or entity can do and how much data it needs to have. It avoids the issue of inhertance as no inhertance is ever required in this system. If you need a certain entity to have a certain functionality you just add the relevant component to it, and the systems that automatically go over specific components will give your entitiy the desired functionality.
+<p>By using this pattern it allows programmers to easily control what an &quot;object&quot; or entity can do and how much data it needs to have. It avoids the issue of inhertance as no inhertance is ever required in this system. If you need a certain entity to have a certain functionality you just add the relevant component to it, and the systems that automatically go over specific components will give your entitiy the desired functionality. </p>
-**&quot;But your framework also has `Scenes`, `Stage`, and `Order`, what is that about?&quot;**
+<p><strong>&quot;But your framework also has <code>Scenes</code>, <code>Stage</code>, and <code>Order</code>, what is that about?&quot;</strong> </p>
----
-</code></pre>
+<hr>
<h3 id="scenes">Scenes</h3>
-<pre class="code ruby"><code class="ruby">Scenes are simply a collection or subset of Systems. This allows for an easy way to activate and deactivate Systems.
-</code></pre>
+<p>Scenes are simply a collection or subset of Systems. This allows for an easy way to activate and deactivate Systems.</p>
<h3 id="stage">Stage</h3>
-<pre class="code ruby"><code class="ruby">The Stage is Scenes which are activated. This means any Scenes on the Stage are executed each frame, while the rest of the Systems are not.
-</code></pre>
+<p>The Stage is Scenes which are activated. This means any Scenes on the Stage are executed each frame, while the rest of the Systems are not.</p>
<h3 id="order">Order</h3>
-<pre class="code ruby"><code class="ruby">Order is a helper class which can set the priority of Scenes and Systems.
+<p>Order is a helper class which can set the priority of Scenes and Systems.</p>
----
-</code></pre>
+<hr>
<h1 id="usage">Usage</h1>
-<pre class="code ruby"><code class="ruby">There are 2 ways of using FelECS. You can either `include` it as a gem in your project if your game engine supports this. The other option is to download the single file export of FelECS and then `require_relative` 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>There are 2 ways of using FelECS. 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 FelECS 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>
-To use the gem method you can do the following: install the gem using `gem install felflame` or using bundler `bundle add felflame` and then require it in your project like so: `require &#39;felflame&#39;`.
+<p>To use the gem method you can do the following: install the gem using <code>gem install felecs</code> or using bundler <code>bundle add felecs</code> and then require it in your project like so: <code>require &#39;felecs&#39;</code>.</p>
-To use the single file export method you simply download the felflame.rb file from the [releases page on Github](https://github.com/realtradam/FelECS/releases) and add it to your source folder and add a `require relative &#39;felflame.rb&#39;` line or wherever you have placed the file to use it.
-</code></pre>
+<p>To use the single file export method you simply download the felecs.rb file from the <a href="https://github.com/realtradam/FelECS/releases">releases page on Github</a> and add it to your source folder and add a <code>require relative &#39;felecs.rb&#39;</code> line or wherever you have placed the file to use it.</p>
<h2 id="entities">Entities</h2>
<h3 id="creation">Creation</h3>
-<pre class="code ruby"><code class="ruby">Entities are essentially &quot;objects&quot; in the game world. To create a new Entity we do the following:
-
-```ruby
-@entity = FelECS::Entities.new
-```
-or if we want to add (any number of)components to it when creating it:
+<p>Entities are essentially &quot;objects&quot; in the game world. To create a new Entity we do the following:</p>
-```ruby
+<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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Entities.html" title="FelECS::Entities (class)">Entities</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FelECS/Entities.html#initialize-instance_method" title="FelECS::Entities#initialize (method)">new</a></span></span>
</code></pre>
-<p>@entity = FelECS::Entites.new(
- FelECS::Components::Health.new,
- @component,
- FelECS::Components::EnemyTeam.first
- )
- ```</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="FelECS.html" title="FelECS (module)">FelECS</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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::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>
-<pre class="code ruby"><code class="ruby">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 `Entities` module:
+<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>
-```ruby
-@entity = FelECS::Entities[2]
-@entity = FelECS::Entities.first
-@entity = FelECS::Entities.each # you can iterate over all entities this way. Any valid array method can be used
-```
-</code></pre>
+<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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Entities.html" title="FelECS::Entities (class)">Entities</a></span></span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span>
+<span class='ivar'>@entity</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Entities.html" title="FelECS::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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Entities.html" title="FelECS::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>
-<pre class="code ruby"><code class="ruby">We can still add or remove Components from an Entity after it has been created. Here is how:
+<p>We can still add or remove Components from an Entity after it has been created. Here is how:</p>
-```ruby
-```
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span> <span class='ivar'>@component</span>
+<span class='ivar'>@entity</span><span class='period'>.</span><span class='id identifier rubyid_remove'>remove</span> <span class='ivar'>@component</span>
</code></pre>
<h3 id="accessing-entities-attached-components">Accessing Entities&#39; Attached Components</h3>
-<pre class="code ruby"><code class="ruby">This is the most common way of accessing an Entity
+<p>This is the most common way of accessing an Entity</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>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>
-```ruby
[email protected][@component_manager] # =&gt; [@component1, @component2, @component3]
-```
-</code></pre>
+<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'># =&gt; [@component1, @component2, @component3]
+</span></code></pre>
<h3 id="deletion">Deletion</h3>
-<pre class="code ruby"><code class="ruby">To have all Components from an Entity **removed** and the Entity deleted we do the following:
+<p>To have all Components from an Entity <strong>removed</strong> and the Entity deleted we do the following:</p>
-NOTE: The components will **not be deleted**. They are simply **removed** 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>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>
-```ruby
-```
+<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>
<h2 id="components">Components</h2>
<h3 id="creating-a-component-manager">Creating a Component Manager</h3>
-<pre class="code ruby"><code class="ruby">Components are where all the data is stored. The data is stored in variables or accessors in each component.
-These accessors and their defaults are configured when a component manager is created, like so:
+<p>Components are where all the data is stored. The data is stored in variables or accessors in each component.
+These accessors and their defaults are configured when a component manager is created, like so:</p>
-```ruby
-@component_manager = FelECS::Components.new(&#39;Stats&#39;, :armour, hp: 100)
-```
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@component_manager</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FelECS/Components.html#new-class_method" title="FelECS::Components.new (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Stats</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='symbol'>:armour</span><span class='comma'>,</span> <span class='label'>hp:</span> <span class='int'>100</span><span class='rparen'>)</span>
+</code></pre>
-In this example we created a component manager called &quot;Stats&quot;.
+<p>In this example we created a component manager called &quot;Stats&quot;.
The name given to component managers must follow the same rules for naming constants in ruby for a reason you will shortly see.
The parameters following are all creating the attributes we can set.
We can set any number of parameters we wish, in this example we define two.
-The `:armour` parameter is being created without a default, it will equal to `nil` when a new component is created, while `hp` will be equal to 100 when a component is created.
-When defining attributes symbols should be used.
-</code></pre>
+The <code>:armour</code> parameter is being created without a default, it will equal to <code>nil</code> when a new component is created, while <code>hp</code> will be equal to 100 when a component is created.
+When defining attributes symbols should be used.</p>
<h3 id="creating-a-component-from-a-component-manager">Creating a Component from a Component Manager</h3>
-<pre class="code ruby"><code class="ruby">Now that we have a component manager we can make components from it like so:
+<p>Now that we have a component manager we can make components from it like so:</p>
-```ruby
-@component = FelECS::Components::Stats.new
-```
+<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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::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>
-Or we can even override the defaults when creating the component:
+<p>Or we can even override the defaults when creating the component:</p>
-```ruby
-@component = FelECS::Components::Stats.new(armour: &#39;steel&#39;)
-```
+<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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::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'>&#39;</span><span class='tstring_content'>steel</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
</code></pre>
<h3 id="accessing">Accessing</h3>
-<pre class="code ruby"><code class="ruby">You can access components using any array method.
+<p>You can access components using any array method.</p>
-```ruby
-@component = FelECS::Components::Stats[2]
-@component = FelECS::Components::Stats.first
-@component = FelECS::Components::Stats.each # you can use iterators this way
-```
-</code></pre>
+<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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::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='op'>=</span> <span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::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>
-<pre class="code ruby"><code class="ruby">There are a few different ways we can read or change the attributes of a component depending on what our needs are.
-Here are the ways to edit attrubutes, followed by the ways to read them.
-```ruby
[email protected] = &#39;Mythril&#39;
[email protected]_attrs(armour: &#39;Leather&#39;, hp: 95)
-```
-```ruby
[email protected]_h # =&gt; {armour: &#39;Leather&#39;, hp: 95}
-```
+<p>There are a few different ways we can read or change the attributes of a component depending on what our needs are.
+Here are the ways to edit attrubutes, followed by the ways to read them.</p>
+
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_armour'>armour</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Mythril</span><span class='tstring_end'>&#39;</span></span>
+<span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_update_attrs'>update_attrs</span><span class='lparen'>(</span><span class='label'>armour:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Leather</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>hp:</span> <span class='int'>95</span><span class='rparen'>)</span>
</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'># =&gt; 95
+</span><span class='ivar'>@component</span><span class='period'>.</span><span class='id identifier rubyid_to_h'>to_h</span> <span class='comment'># =&gt; {armour: &#39;Leather&#39;, hp: 95}
+</span></code></pre>
+
<h3 id="deleting-components">Deleting Components</h3>
-<pre class="code ruby"><code class="ruby">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>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>
-```ruby
-```
+<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="accessing-components-attached-entities">Accessing Components&#39; attached Entities</h3>
-<pre class="code ruby"><code class="ruby">Components also keep track of what Entities are using it. To access this list we do the following:
+<p>Components also keep track of what Entities are using it. To access this list we do the following:</p>
-```ruby
[email protected] # =&gt; [@entity1, @entity2, @entity3]
-</code></pre>
-
-<h1 id="get-the-first-entity-attached">get the first entity attached.</h1>
-
-<h1 id="this-will-throw-a-warning-if-there-is-more-or-less-then">this will throw a warning if there is more or less then</h1>
-
-<h1 id="exactly-one-entity">exactly one entity</h1>
-
-<pre class="code ruby"><code class="ruby">@component.entity # =&gt; @entity
-```
-</code></pre>
+<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'># =&gt; [@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'># =&gt; @entity
+</span></code></pre>
<h2 id="systems">Systems</h2>
<h3 id="creation">Creation</h3>
-<pre class="code ruby"><code class="ruby">We can create Systems like so:
+<p>We can create Systems like so:</p>
-```ruby
-FelECS::Systems.new(&#39;Render&#39;, priority: 2) do
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FelECS/Systems.html#initialize-instance_method" title="FelECS::Systems#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Render</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>priority:</span> <span class='int'>2</span><span class='rparen'>)</span> <span class='kw'>do</span>
+ <span class='comment'># Code and Logic
+</span><span class='kw'>end</span>
</code></pre>
-<h1 id="code-and-logic">Code and Logic</h1>
-
-<pre class="code ruby"><code class="ruby">end
-```
+<p>The name we assign is how we can access the System, like so:</p>
-The name we assign is how we can access the System, like so:
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>Render</span>
+</code></pre>
-```ruby
-FelECS::Systems::Render
-```
-Priority determines the order Systems should be executed, this is used for `Scenes` and the `Stage`.
+<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.
+E.g priority 1 will go first, priority 2 will go second, etcetera. </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>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>
-Often we will want to execute some logic on each Component in a given Component Manager so our code might look like this:
+<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>
-```ruby
-FelECS::Systems.new(&#39;Render&#39;, priority: 2) do
-FelECS::Components::Sprites.each do |component|
-</code></pre>
-
-<h1 id="do-something-with-these-components">do something with these components</h1>
-
-<pre class="code ruby"><code class="ruby">end
-end
-```
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FelECS/Systems.html#initialize-instance_method" title="FelECS::Systems#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Render</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>priority:</span> <span class='int'>2</span><span class='rparen'>)</span> <span class='kw'>do</span>
+ <span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Components.html" title="FelECS::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 these components
+</span> <span class='kw'>end</span>
+<span class='kw'>end</span>
</code></pre>
<h3 id="execution">Execution</h3>
-<pre class="code ruby"><code class="ruby">After we create a System, it won&#39;t do anything on its own until we tell it to. Here is how:
-
-```ruby
-FelECS::Systems::Render.call
-```
-
-Sometimes you might want to manually activate a System, but the more common way to have Systems be triggered is to use Scenes and the Stage or the alternative ways of execution.
-</code></pre>
-
-<h3 id="alternative-execution">Alternative Execution</h3>
-
-<pre class="code ruby"><code class="ruby">Sometimes you want a System to automatically trigger when a special even happens. FelECS can keep track of when a Component is added, removed, or when an attribute is changed and then execute Systems linked to these events. Here is how to create these links:
+<p>After we create a System, it won&#39;t do anything on its own until we tell it to. Here is how:</p>
-```ruby
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>Render</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
</code></pre>
-<h1 id="when-this-component-is-added-to-an-entity-this-system-will-be-called">When this Component is added to an Entity, this System will be called</h1>
-
-<p>FelECS::Systems::PassiveRegen.trigger_when_added(@component)</p>
+<p>Sometimes you might want to manually activate a System, but the more common way to have Systems be triggered is to use Scenes and the Stage or the alternative ways of execution.</p>
-<h1 id="when-this-component-is-removed-from-an-entity-this-system-will-be-called">When this Component is removed from an Entity, this System will be called</h1>
-
-<p>FelECS::Systems::PassiveRegen.trigger_when_removed(@component)</p>
+<h3 id="alternative-execution">Alternative Execution</h3>
-<h1 id="when-this-components-health-attribute-is-changed-this-system-will-be-called">When this Component&#39;s health attribute is changed, this System will be called</h1>
+<p>Sometimes you want a System to automatically trigger when a special even happens. FelECS can keep track of when a Component is added, removed, or when an attribute is changed and then execute Systems linked to these events. Here is how to create these links:</p>
-<p>FelECS::Systems::PassiveRegen.trigger_when_is_set(@component, :health)
- ```</p>
+<pre class="code ruby"><code class="ruby"><span class='comment'># When this Component is added to an Entity, this System will be called
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_added'>trigger_when_added</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='rparen'>)</span>
-<pre class="code ruby"><code class="ruby">If we want these triggers to happen for all Components that belong to specific Component Manager then we can do that instead:
+<span class='comment'># When this Component is removed from an Entity, this System will be called
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_removed'>trigger_when_removed</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='rparen'>)</span>
-```ruby
+<span class='comment'># When this Component&#39;s health attribute is changed, this System will be called
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_is_changed'>trigger_when_is_changed</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='comma'>,</span> <span class='symbol'>:health</span><span class='rparen'>)</span>
</code></pre>
-<h1 id="when-a-component-from-this-component-manager-is-added-to-an-entity-this-system-will-be-called">When a Component from this Component Manager is added to an Entity, this System will be called</h1>
+<p>If we want these triggers to happen for all Components that belong to specific Component Manager then we can do that instead:</p>
-<p>FelECS::Systems::PassiveRegen.trigger_when_added(@component_manager)</p>
+<pre class="code ruby"><code class="ruby"><span class='comment'># When a Component from this Component Manager is added to an Entity, this System will be called
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_added'>trigger_when_added</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='rparen'>)</span>
-<h1 id="when-a-component-from-this-component-manager-is-removed-from-an-entity-this-system-will-be-called">When a Component from this Component Manager is removed from an Entity, this System will be called</h1>
+<span class='comment'># When a Component from this Component Manager is removed from an Entity, this System will be called
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_removed'>trigger_when_removed</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='rparen'>)</span>
-<p>FelECS::Systems::PassiveRegen.trigger_when_removed(@component_manager)</p>
-
-<h1 id="when-this-components-health-attribute-from-this-component-manager-is-changed-this-system-will-be-called">When this Component&#39;s health attribute from this Component Manager is changed, this System will be called</h1>
-
-<p>FelECS::Systems::PassiveRegen.trigger_when_is_set(@component_manager, :health)
- ```</p>
-
-<pre class="code ruby"><code class="ruby">We can create any number of these links between Systems, Components, and Component Manangers as we like, simply call the method again with our other Components and Component Managers
-</code></pre>
-
-<h3 id="clearing-alternative-executions">Clearing Alternative Executions</h3>
-
-<pre class="code ruby"><code class="ruby">If we wish to remove these links that we created, we can do that using the follwing function in any of the following ways:
-
-```ruby
+<span class='comment'># When this Component&#39;s health attribute from this Component Manager is changed, this System will be called
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_trigger_when_is_changed'>trigger_when_is_changed</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='comma'>,</span> <span class='symbol'>:health</span><span class='rparen'>)</span>
</code></pre>
-<h1 id="clears-all-triggers-with-this-system">clears ALL triggers with this system</h1>
-
-<pre class="code ruby"><code class="ruby"><span class='const'>FelECS</span><span class='op'>::</span><span class='const'>Systems</span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span>
-</code></pre>
+<p>We can create any number of these links between Systems, Components, and Component Manangers as we like, simply call the method again with our other Components and Component Managers</p>
-<h1 id="clears-all-triggers-with-this-component-manager">clears ALL triggers with this Component Manager</h1>
-
-<p>FelECS::Systems::PassiveRegen.clear_triggers(@component)</p>
-
-<h1 id="clear-the-trigger_when_added-for-this-component">clear the &#39;trigger_when_added&#39; for this Component</h1>
-
-<p>FelECS::Systems::PassiveRegen.clear_triggers(@component, :added)</p>
+<h3 id="clearing-alternative-executions">Clearing Alternative Executions</h3>
-<h1 id="clear-the-trigger_when_removed-for-this-component">clear the &#39;trigger_when_removed&#39; for this Component</h1>
+<p>If we wish to remove these links that we created, we can do that using the follwing function in any of the following ways:</p>
-<p>FelECS::Systems::PassiveRegen.clear_triggers(@component, :removed)</p>
+<pre class="code ruby"><code class="ruby"><span class='comment'># clears ALL triggers with this system
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span>
-<h1 id="clear-the-trigger_when_is_set-for-this-component-specifically-for-the-health-attribute">clear the &#39;trigger_when_is_set&#39; for this Component specifically for the health attribute</h1>
+<span class='comment'># clears ALL triggers with this Component Manager
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='rparen'>)</span>
-<p>FelECS::Systems::PassiveRegen.clear_triggers(@component, :is_set, :health)
- ```</p>
+<span class='comment'># clear the &#39;trigger_when_added&#39; for this Component
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='comma'>,</span> <span class='symbol'>:added</span><span class='rparen'>)</span>
-<pre class="code ruby"><code class="ruby">Likewise we can do the same with Component Managers:
+<span class='comment'># clear the &#39;trigger_when_removed&#39; for this Component
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='comma'>,</span> <span class='symbol'>:removed</span><span class='rparen'>)</span>
-```ruby
+<span class='comment'># clear the &#39;trigger_when_is_changed&#39; for this Component specifically for the health attribute
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component</span><span class='comma'>,</span> <span class='symbol'>:is_set</span><span class='comma'>,</span> <span class='symbol'>:health</span><span class='rparen'>)</span>
</code></pre>
-<h1 id="clears-all-triggers-with-this-component">clears ALL triggers with this Component</h1>
-
-<p>FelECS::Systems::PassiveRegen.clear_triggers(@component_manager) </p>
+<p>Likewise we can do the same with Component Managers:</p>
-<h1 id="clear-the-trigger_when_added-for-this-component-manager">clear the &#39;trigger_when_added&#39; for this Component Manager</h1>
+<pre class="code ruby"><code class="ruby"><span class='comment'># clears ALL triggers with this Component
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='rparen'>)</span>
-<p>FelECS::Systems::PassiveRegen.clear_triggers(@component_manager, :added) </p>
+<span class='comment'># clear the &#39;trigger_when_added&#39; for this Component Manager
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='comma'>,</span> <span class='symbol'>:added</span><span class='rparen'>)</span>
-<h1 id="clear-the-trigger_when_removed-for-this-component-manager">clear the &#39;trigger_when_removed&#39; for this Component Manager</h1>
+<span class='comment'># clear the &#39;trigger_when_removed&#39; for this Component Manager
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='comma'>,</span> <span class='symbol'>:removed</span><span class='rparen'>)</span>
-<p>FelECS::Systems::PassiveRegen.clear_triggers(@component_manager, :removed) </p>
-
-<h1 id="clear-the-trigger_when_is_set-for-this-component-manager-specifically-for-the-health-attribute">clear the &#39;trigger_when_is_set&#39; for this Component Manager specifically for the health attribute</h1>
-
-<p>FelECS::Systems::PassiveRegen.clear_triggers(@component_manager, :is_set, :health)
- ```</p>
+<span class='comment'># clear the &#39;trigger_when_is_changed&#39; for this Component Manager specifically for the health attribute
+</span><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='ivar'>@component_manager</span><span class='comma'>,</span> <span class='symbol'>:is_set</span><span class='comma'>,</span> <span class='symbol'>:health</span><span class='rparen'>)</span>
+</code></pre>
<h3 id="redefinition">Redefinition</h3>
-<pre class="code ruby"><code class="ruby">If we wanted to change what code or logic a given System executes, we could do that with:
+<p>If we wanted to change what code or logic a given System executes, we could do that with:</p>
-```ruby
-FelECS::Systems::PassiveRegen.redefine do
-</code></pre>
-
-<h1 id="some-new-logic-or-code">Some new logic or code</h1>
-
-<pre class="code ruby"><code class="ruby">end
-```
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::Systems (class)">Systems</a></span></span><span class='op'>::</span><span class='const'>PassiveRegen</span><span class='period'>.</span><span class='id identifier rubyid_redefine'>redefine</span> <span class='kw'>do</span>
+ <span class='comment'># Some new logic or code
+</span><span class='kw'>end</span>
</code></pre>
<h2 id="scenes">Scenes</h2>
<h3 id="creation">Creation</h3>
-<pre class="code ruby"><code class="ruby">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 [Alternative Executions](#alternative-execution) will occur even if they are not part of a Scene. Here is how we make a new Scene:
+<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>
-```ruby
-@scene = FelECS::Scenes.new(&#39;ExampleScene&#39;, priority: 5)
-```
+<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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Scenes.html" title="FelECS::Scenes (class)">Scenes</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FelECS/Scenes.html#initialize-instance_method" title="FelECS::Scenes#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ExampleScene</span><span class='tstring_end'>&#39;</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>
-<pre class="code ruby"><code class="ruby">Just like other classes in FelECS, the name we gave the Scene is how we access it:
+<p>Just like other classes in FelECS, the name we gave the Scene is how we access it:</p>
-```ruby
-@scene = FelECS::Scenes::ExampleScene
-```
+<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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Scenes.html" title="FelECS::Scenes (class)">Scenes</a></span></span><span class='op'>::</span><span class='const'>ExampleScene</span>
</code></pre>
<h3 id="adding-systems">Adding Systems</h3>
-<pre class="code ruby"><code class="ruby">Adding Systems is simple. We can add as many as we want. In this example we add 3 different systems:
+<p>Adding Systems is simple. We can add as many as we want. In this example we add 3 different systems:</p>
-```ruby
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Scenes.html" title="FelECS::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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::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>
-<p>FelECS::Scenes::ExampleScene.add(
- FelECS::Systems::Render,
- @system2,
- @system3
- )
- ```</p>
-
<h3 id="removing-systems">Removing Systems</h3>
-<pre class="code ruby"><code class="ruby">Removing Systems works similarly:
+<p>Removing Systems works similarly:</p>
-```ruby
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Scenes.html" title="FelECS::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="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Systems.html" title="FelECS::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>
-<p>FelECS::Scenes::ExampleScene.remove(
- FelECS::Systems::Render,
- @system2,
- @system3
- )
- ```</p>
-
<h3 id="clearing">Clearing</h3>
-<pre class="code ruby"><code class="ruby">If you want to remove all Systems from a Scene here is how we do it:
+<p>If you want to remove all Systems from a Scene here is how we do it:</p>
-```ruby
-```
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@scene</span><span class='period'>.</span><span class='id identifier rubyid_clear'>clear</span>
</code></pre>
<h3 id="execution">Execution</h3>
-<pre class="code ruby"><code class="ruby">To execute all Systems within a scene once we can just do:
+<p>To execute all Systems within a scene once we can just do:</p>
-```ruby
-```
-
-The Scene will make sure that the systems are executed in the correct order based on their given priorities
+<pre class="code ruby"><code class="ruby"><span class='ivar'>@scene</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
</code></pre>
+<p>The Scene will make sure that the systems are executed in the correct order based on their given priorities</p>
+
<h2 id="stage">Stage</h2>
<h3 id="adding-scenes">Adding Scenes</h3>
-<pre class="code ruby"><code class="ruby">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 &#39;active&#39;. To add a Scene we do the following:
+<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 &#39;active&#39;. To add a Scene we do the following:</p>
-```ruby
-FelECS::Stage.add FelECS::Scene::ExampleScene
-```
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Stage.html" title="FelECS::Stage (module)">Stage</a></span></span><span class='period'>.</span><span class='id identifier rubyid_add'><span class='object_link'><a href="FelECS/Stage.html#add-class_method" title="FelECS::Stage.add (method)">add</a></span></span> <span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'>Scene</span><span class='op'>::</span><span class='const'>ExampleScene</span>
</code></pre>
<h3 id="removing-scenes">Removing Scenes</h3>
-<pre class="code ruby"><code class="ruby">Likewise we can remove Scenes:
+<p>Likewise we can remove Scenes:</p>
-```ruby
-FelECS::Stage.remove FelECS::Scene::ExampleScene
-```
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Stage.html" title="FelECS::Stage (module)">Stage</a></span></span><span class='period'>.</span><span class='id identifier rubyid_remove'><span class='object_link'><a href="FelECS/Stage.html#remove-class_method" title="FelECS::Stage.remove (method)">remove</a></span></span> <span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'>Scene</span><span class='op'>::</span><span class='const'>ExampleScene</span>
</code></pre>
<h3 id="executing">Executing</h3>
-<pre class="code ruby"><code class="ruby">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>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>
-```ruby
-FelECS::Stage.call
-```
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Stage.html" title="FelECS::Stage (module)">Stage</a></span></span><span class='period'>.</span><span class='id identifier rubyid_call'><span class='object_link'><a href="FelECS/Stage.html#call-class_method" title="FelECS::Stage.call (method)">call</a></span></span>
</code></pre>
<h2 id="order">Order</h2>
<h3 id="setting-the-order">Setting the order</h3>
-<pre class="code ruby"><code class="ruby">To set the order you just need to call `FelECS::Order.sort` and pass Scenes or Systems in the parameters in the order you wish for them to execute
+<p>To set the order you just need to call <code>FelECS::Order.sort</code> and pass Scenes or Systems in the parameters in the order you wish for them to execute</p>
-```ruby
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Order.html" title="FelECS::Order (module)">Order</a></span></span><span class='period'>.</span><span class='id identifier rubyid_sort'><span class='object_link'><a href="FelECS/Order.html#sort-class_method" title="FelECS::Order.sort (method)">sort</a></span></span><span class='lparen'>(</span>
+ <span class='ivar'>@system1</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>
-<p>FelECS::Order.sort(
- @system1,
- @system2,
- @system3
- )
- ```</p>
+<p>If you want some Scenes or Systems to have the same priority then just pass them as an array:</p>
-<pre class="code ruby"><code class="ruby">If you want some Scenes or Systems to have the same priority then just pass them as an array:
-
-```ruby
+<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelECS/Order.html" title="FelECS::Order (module)">Order</a></span></span><span class='period'>.</span><span class='id identifier rubyid_sort'><span class='object_link'><a href="FelECS/Order.html#sort-class_method" title="FelECS::Order.sort (method)">sort</a></span></span><span class='lparen'>(</span>
+ <span class='ivar'>@scene1</span><span class='comma'>,</span>
+ <span class='lbracket'>[</span><span class='ivar'>@scene2_1</span><span class='comma'>,</span> <span class='ivar'>@scene2_2</span><span class='rbracket'>]</span><span class='comma'>,</span>
+ <span class='ivar'>@scene3</span>
+<span class='rparen'>)</span>
</code></pre>
-<p>FelECS::Order.sort(
- @scene1,
- [@scene2_1, @scene2_2],
- @scene3
- )
- ```</p>
-
<h2 id="closing-notes">Closing Notes</h2>
-<pre class="code ruby"><code class="ruby">There are some methods I haven&#39;t gone over in the overview. If you want to see everything and read in more detail check out the [Documentation](https://felflame.tradam.fyi)!
-</code></pre>
+<p>There are some methods I haven&#39;t gone over in the overview. If you want to see everything and read in more detail check out the <a href="https://felflame.tradam.fyi">Documentation</a>!</p>
<h1 id="contribution">Contribution</h1>
-<pre class="code ruby"><code class="ruby">Contributors are welcome! I am always looking to impove the capabilities of game development in Ruby. Feel free to open an issue to discuss a proposed changed or fix. To code a change or fix first fork the project. Next write your changes or fixes. Make sure all your changes and fixes are properly documented using Yard(I will not merge if it is not 100% documented) and make sure everything has tests written for it with Rspec(I will also not merge if it does not have 100% test coverage). Once you have your changes made then simply make a pull request.
+<p>Contributors are welcome! I am always looking to impove the capabilities of game development in Ruby. Feel free to open an issue to discuss a proposed changed or fix. To code a change or fix first fork the project. Next write your changes or fixes. Make sure all your changes and fixes are properly documented using Yard(I will not merge if it is not 100% documented) and make sure everything has tests written for it with Rspec(I will also not merge if it does not have 100% test coverage). Once you have your changes made then simply make a pull request. </p>
-If you need help writing documentation or tests feel free to ask!
+<p>If you need help writing documentation or tests feel free to ask! </p>
-If you want to contribute to development with a thanks you can always [buy me a coffee ;^)](https://ko-fi.com/tradam)
-</code></pre>
+<p>If you want to contribute to development with a thanks you can always <a href="https://ko-fi.com/tradam">buy me a coffee ;^)</a></p>
</div></div>
<div id="footer">
- Generated on Thu Jan 20 22:40:31 2022 by
+ Generated on Fri Jan 28 16:21:20 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 48eea1f..9df50e9 100644
--- a/docs/method_list.html
+++ b/docs/method_list.html
@@ -44,6 +44,374 @@
<ul id="full_list" class="method">
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Scenes.html#add-instance_method" title="FelECS::Scenes#add (method)">#add</a></span>
+ <small>FelECS::Scenes</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Stage.html#add-class_method" title="FelECS::Stage.add (method)">add</a></span>
+ <small>FelECS::Stage</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Entities.html#add-instance_method" title="FelECS::Entities#add (method)">#add</a></span>
+ <small>FelECS::Entities</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Systems.html#addition_triggers-instance_method" title="FelECS::Systems#addition_triggers (method)">#addition_triggers</a></span>
+ <small>FelECS::Systems</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/ComponentManager.html#addition_triggers-instance_method" title="FelECS::ComponentManager#addition_triggers (method)">#addition_triggers</a></span>
+ <small>FelECS::ComponentManager</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/ComponentManager.html#addition_triggers-class_method" title="FelECS::ComponentManager.addition_triggers (method)">addition_triggers</a></span>
+ <small>FelECS::ComponentManager</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Systems.html#attr_triggers-instance_method" title="FelECS::Systems#attr_triggers (method)">#attr_triggers</a></span>
+ <small>FelECS::Systems</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/ComponentManager.html#attr_triggers-instance_method" title="FelECS::ComponentManager#attr_triggers (method)">#attr_triggers</a></span>
+ <small>FelECS::ComponentManager</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/ComponentManager.html#attr_triggers-class_method" title="FelECS::ComponentManager.attr_triggers (method)">attr_triggers</a></span>
+ <small>FelECS::ComponentManager</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS.html#call-class_method" title="FelECS.call (method)">call</a></span>
+ <small>FelECS</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Scenes.html#call-instance_method" title="FelECS::Scenes#call (method)">#call</a></span>
+ <small>FelECS::Scenes</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Stage.html#call-class_method" title="FelECS::Stage.call (method)">call</a></span>
+ <small>FelECS::Stage</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Systems.html#call-instance_method" title="FelECS::Systems#call (method)">#call</a></span>
+ <small>FelECS::Systems</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Scenes.html#clear-instance_method" title="FelECS::Scenes#clear (method)">#clear</a></span>
+ <small>FelECS::Scenes</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Stage.html#clear-class_method" title="FelECS::Stage.clear (method)">clear</a></span>
+ <small>FelECS::Stage</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Systems.html#clear_triggers-instance_method" title="FelECS::Systems#clear_triggers (method)">#clear_triggers</a></span>
+ <small>FelECS::Systems</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Entities.html#component-instance_method" title="FelECS::Entities#component (method)">#component</a></span>
+ <small>FelECS::Entities</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Entities.html#components-instance_method" title="FelECS::Entities#components (method)">#components</a></span>
+ <small>FelECS::Entities</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Systems.html#const_cache-class_method" title="FelECS::Systems.const_cache (method)">const_cache</a></span>
+ <small>FelECS::Systems</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Entities.html#delete-instance_method" title="FelECS::Entities#delete (method)">#delete</a></span>
+ <small>FelECS::Entities</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/ComponentManager.html#delete-instance_method" title="FelECS::ComponentManager#delete (method)">#delete</a></span>
+ <small>FelECS::ComponentManager</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/ComponentManager.html#entities-instance_method" title="FelECS::ComponentManager#entities (method)">#entities</a></span>
+ <small>FelECS::ComponentManager</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/ComponentManager.html#entity-instance_method" title="FelECS::ComponentManager#entity (method)">#entity</a></span>
+ <small>FelECS::ComponentManager</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Scenes.html#initialize-instance_method" title="FelECS::Scenes#initialize (method)">#initialize</a></span>
+ <small>FelECS::Scenes</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Entities.html#initialize-instance_method" title="FelECS::Entities#initialize (method)">#initialize</a></span>
+ <small>FelECS::Entities</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Systems.html#initialize-instance_method" title="FelECS::Systems#initialize (method)">#initialize</a></span>
+ <small>FelECS::Systems</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/ComponentManager.html#initialize-instance_method" title="FelECS::ComponentManager#initialize (method)">#initialize</a></span>
+ <small>FelECS::ComponentManager</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Components.html#new-class_method" title="FelECS::Components.new (method)">new</a></span>
+ <small>FelECS::Components</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Scenes.html#priority-instance_method" title="FelECS::Scenes#priority (method)">#priority</a></span>
+ <small>FelECS::Scenes</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Systems.html#priority-instance_method" title="FelECS::Systems#priority (method)">#priority</a></span>
+ <small>FelECS::Systems</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Systems.html#redefine-instance_method" title="FelECS::Systems#redefine (method)">#redefine</a></span>
+ <small>FelECS::Systems</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Systems.html#removal_triggers-instance_method" title="FelECS::Systems#removal_triggers (method)">#removal_triggers</a></span>
+ <small>FelECS::Systems</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/ComponentManager.html#removal_triggers-instance_method" title="FelECS::ComponentManager#removal_triggers (method)">#removal_triggers</a></span>
+ <small>FelECS::ComponentManager</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/ComponentManager.html#removal_triggers-class_method" title="FelECS::ComponentManager.removal_triggers (method)">removal_triggers</a></span>
+ <small>FelECS::ComponentManager</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Scenes.html#remove-instance_method" title="FelECS::Scenes#remove (method)">#remove</a></span>
+ <small>FelECS::Scenes</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Stage.html#remove-class_method" title="FelECS::Stage.remove (method)">remove</a></span>
+ <small>FelECS::Stage</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Entities.html#remove-instance_method" title="FelECS::Entities#remove (method)">#remove</a></span>
+ <small>FelECS::Entities</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Stage.html#scenes-class_method" title="FelECS::Stage.scenes (method)">scenes</a></span>
+ <small>FelECS::Stage</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Systems.html#scenes-instance_method" title="FelECS::Systems#scenes (method)">#scenes</a></span>
+ <small>FelECS::Systems</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Order.html#sort-class_method" title="FelECS::Order.sort (method)">sort</a></span>
+ <small>FelECS::Order</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Scenes.html#systems-instance_method" title="FelECS::Scenes#systems (method)">#systems</a></span>
+ <small>FelECS::Scenes</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/ComponentManager.html#to_h-instance_method" title="FelECS::ComponentManager#to_h (method)">#to_h</a></span>
+ <small>FelECS::ComponentManager</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Systems.html#trigger_when_added-instance_method" title="FelECS::Systems#trigger_when_added (method)">#trigger_when_added</a></span>
+ <small>FelECS::Systems</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Systems.html#trigger_when_is_changed-instance_method" title="FelECS::Systems#trigger_when_is_changed (method)">#trigger_when_is_changed</a></span>
+ <small>FelECS::Systems</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/Systems.html#trigger_when_removed-instance_method" title="FelECS::Systems#trigger_when_removed (method)">#trigger_when_removed</a></span>
+ <small>FelECS::Systems</small>
+ </div>
+ </li>
+
+
+ <li class="even ">
+ <div class="item">
+ <span class='object_link'><a href="FelECS/ComponentManager.html#update_attrs-instance_method" title="FelECS::ComponentManager#update_attrs (method)">#update_attrs</a></span>
+ <small>FelECS::ComponentManager</small>
+ </div>
+ </li>
+
+
</ul>
</div>
diff --git a/docs/top-level-namespace.html b/docs/top-level-namespace.html
index 6ab8ca4..c9879d9 100644
--- a/docs/top-level-namespace.html
+++ b/docs/top-level-namespace.html
@@ -78,6 +78,43 @@
</div>
+<h2>Defined Under Namespace</h2>
+<p class="children">
+
+
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span>
+
+
+
+
+</p>
+
+
+ <h2>
+ Constant Summary
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
+ </h2>
+
+ <dl class="constants">
+
+ <dt id="FECS-constant" class="">FECS =
+ <div class="docstring">
+ <div class="discussion">
+
+<p>An alias for <span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+
+</div>
+ </dt>
+ <dd><pre class="code"><span class='const'><span class='object_link'><a href="FelECS.html" title="FelECS (module)">FelECS</a></span></span></pre></dd>
+
+ </dl>
+
@@ -90,7 +127,7 @@
</div>
<div id="footer">
- Generated on Thu Jan 20 22:40:31 2022 by
+ Generated on Fri Jan 28 16:21:20 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/lib/felecs/component_manager.rb b/lib/felecs/component_manager.rb
index 36916cb..02e4d05 100644
--- a/lib/felecs/component_manager.rb
+++ b/lib/felecs/component_manager.rb
@@ -36,8 +36,10 @@ module FelECS
attrs_with_defaults[attr] = _default.dup
FelECS::Components.const_get(component_name).attr_reader attr
FelECS::Components.const_get(component_name).define_method("#{attr}=") do |value|
- attr_changed_trigger_systems(attr) unless value.equal? send(attr)
- instance_variable_set("@#{attr}", value)
+ unless value.equal? send(attr)
+ instance_variable_set("@#{attr}", value)
+ attr_changed_trigger_systems(attr)
+ end
end
end
FelECS::Components.const_get(component_name).define_method(:set_defaults) do
diff --git a/mrbgem/mrblib/felecs.rb b/mrbgem/mrblib/felecs.rb
index acc7f29..56726b2 100644
--- a/mrbgem/mrblib/felecs.rb
+++ b/mrbgem/mrblib/felecs.rb
@@ -197,8 +197,10 @@ module FelECS
attrs_with_defaults[attr] = _default.dup
FelECS::Components.const_get(component_name).attr_reader attr
FelECS::Components.const_get(component_name).define_method("#{attr}=") do |value|
- attr_changed_trigger_systems(attr) unless value.equal? send(attr)
- instance_variable_set("@#{attr}", value)
+ unless value.equal? send(attr)
+ instance_variable_set("@#{attr}", value)
+ attr_changed_trigger_systems(attr)
+ end
end
end
FelECS::Components.const_get(component_name).define_method(:set_defaults) do