summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.mdown74
-rw-r--r--README.mdown27
-rw-r--r--docs/CNAME1
-rw-r--r--docs/FelECS.html2
-rw-r--r--docs/FelECS/ComponentManager.html2
-rw-r--r--docs/FelECS/Components.html2
-rw-r--r--docs/FelECS/Entities.html145
-rw-r--r--docs/FelECS/Order.html2
-rw-r--r--docs/FelECS/Scenes.html2
-rw-r--r--docs/FelECS/Stage.html2
-rw-r--r--docs/FelECS/Systems.html2
-rw-r--r--docs/FelFlame.html319
-rw-r--r--docs/FelFlame/ComponentManager.html1239
-rw-r--r--docs/FelFlame/Components.html333
-rw-r--r--docs/FelFlame/Entities.html792
-rw-r--r--docs/FelFlame/Helper.html142
-rw-r--r--docs/FelFlame/Helper/ComponentManager.html1627
-rw-r--r--docs/FelFlame/Order.html251
-rw-r--r--docs/FelFlame/Scenes.html765
-rw-r--r--docs/FelFlame/Stage.html572
-rw-r--r--docs/FelFlame/Systems.html1505
-rw-r--r--docs/Felflame_.html143
-rw-r--r--docs/_index.html2
-rw-r--r--docs/file.README.html2
-rw-r--r--docs/file.version.html74
-rw-r--r--docs/index.html2
-rw-r--r--docs/method_list.html52
-rw-r--r--docs/top-level-namespace.html2
-rw-r--r--lib/felecs/entity_manager.rb33
-rw-r--r--mrbgem/mrblib/felecs.rb33
-rw-r--r--spec/entity_manager_spec.rb44
31 files changed, 364 insertions, 7829 deletions
diff --git a/CHANGELOG.mdown b/CHANGELOG.mdown
index 9b4bdba..5e922dd 100644
--- a/CHANGELOG.mdown
+++ b/CHANGELOG.mdown
@@ -8,6 +8,16 @@
![Deprecated](https://img.shields.io/badge/-Deprecated-orange)
![Removed](https://img.shields.io/badge/-Removed-red)
+
+## [5.0.1](https://github.com/realtradam/FelFlame/releases/tag/5.0.1) - 2022-02-03
+![Added](https://img.shields.io/badge/-Added-brightgreen)
+- Added a method to the Entity Manager which allows grouping entities by components and then execute a block for each one.
+```ruby
+FelECS::Entities.group(@component_manager_one, @component_manager_two).do |cmp1, cmp2, ent|
+# do stuff with the components and entity
+end
+```
+
## [5.0.0](https://github.com/realtradam/FelFlame/releases/tag/5.0.0) - 2022-02-02
![Changed](https://img.shields.io/badge/-Changed-yellow)
- Renamed to FelECS
@@ -27,54 +37,54 @@
- Various arrays are automatically compacted
![Added](https://img.shields.io/badge/-Added-brightgreen)
-- Classes and Modules which used a data array now have the entire set of array methods available to their respective Classes and Modules
+ - Classes and Modules which used a data array now have the entire set of array methods available to their respective Classes and Modules
- Convenience methods for accessing a single entity in a component(`@component.entity`) and accessing a single entity in a component(`@entity.component[@component_manager]`)
-- `FelFlame::Order` class which can set the order of your Scenes and Systems
+ - `FelFlame::Order` class which can set the order of your Scenes and Systems
-![Fixed](https://img.shields.io/badge/-Fixed-blue)
-- Replaced all instances of `sort_by!` with `sort_by` for compatibility with mruby
-- Minor optimizations such as less array duplication
+ ![Fixed](https://img.shields.io/badge/-Fixed-blue)
+ - Replaced all instances of `sort_by!` with `sort_by` for compatibility with mruby
+ - Minor optimizations such as less array duplication
## [3.0.0](https://github.com/realtradam/FelFlame/releases/tag/3.0.0) - 2021-07-12
-![Changed](https://img.shields.io/badge/-Changed-yellow)
-- The Scene alias was changed from ```FelFlame::Sce``` to ```FelFlame::Scn``` as it is more intuitive.
+ ![Changed](https://img.shields.io/badge/-Changed-yellow)
+ - The Scene alias was changed from ```FelFlame::Sce``` to ```FelFlame::Scn``` as it is more intuitive.
## [2.0.0](https://github.com/realtradam/FelFlame/releases/tag/2.0.0) - 2021-07-10
-![Changed](https://img.shields.io/badge/-Changed-yellow)
-- Entities and Components now reference each other using the objects themselves rather then their id's
-```ruby
+ ![Changed](https://img.shields.io/badge/-Changed-yellow)
+ - Entities and Components now reference each other using the objects themselves rather then their id's
+ ```ruby
# before:
[email protected][@component_manager].each do |component_id|
- # iterate over id's, usually would need to do a lookup to get the component itself
-end
+ @entity.components[@component_manager].each do |component_id|
+# iterate over id's, usually would need to do a lookup to get the component itself
+ end
# after:
[email protected][@component_manager].each do |component|
- # iterate over the components themselves! No need for lookup anymore
-end
-```
-```ruby
+ @entity.components[@component_manager].each do |component|
+# iterate over the components themselves! No need for lookup anymore
+ end
+ ```
+ ```ruby
# same for components referencing entities
# before:
[email protected] do |entity_id|
- #iterate over id's
-end
+ @component.entities.each do |entity_id|
+#iterate over id's
+ end
# after:
[email protected] do |entity|
- # directly iterate over entities themselves!
-end
-```
-
+ @component.entities.each do |entity|
+# directly iterate over entities themselves!
+ end
+ ```
+
## [1.0.2](https://github.com/realtradam/FelFlame/releases/tag/1.0.2) - 2021-07-09
-![Fixed](https://img.shields.io/badge/-Fixed-blue)
-- Stripped superflous files shrinking gem size significantly
+ ![Fixed](https://img.shields.io/badge/-Fixed-blue)
+ - Stripped superflous files shrinking gem size significantly
## [1.0.1](https://github.com/realtradam/FelFlame/releases/tag/1.0.1) - 2021-07-09
-![Fixed](https://img.shields.io/badge/-Fixed-blue)
-- Defining attributes in components are no longer allowed to overwrite methods
+ ![Fixed](https://img.shields.io/badge/-Fixed-blue)
+ - Defining attributes in components are no longer allowed to overwrite methods
## [1.0.0](https://github.com/realtradam/FelFlame/releases/tag/1.0.0) - 2021-07-09
-![Added](https://img.shields.io/badge/-Added-brightgreen)
-- Initial release
+ ![Added](https://img.shields.io/badge/-Added-brightgreen)
+ - Initial release
diff --git a/README.mdown b/README.mdown
index 4aea705..dbee907 100644
--- a/README.mdown
+++ b/README.mdown
@@ -27,6 +27,7 @@
* [Accessing](#accessing)
* [Adding and Removing Components](#adding-and-removing-components)
* [Accessing Entities' Attached Components](#accessing-entities-attached-components)
+ * [Iterating Over Grouped Entities](#iterating-over-grouped-entities)
* [Deletion](#deletion)
* [Components](#components-1)
* [Creating a Component Manager](#creating-a-component-manager)
@@ -155,6 +156,32 @@ When Components are added to Entities, they can be accessed from the Entity. By
@entity.components[@component_manager] # => [@component1, @component2, @component3]
```
+### Iterating Over Grouped Entities
+You can execute a block for each entity that has all matching component types attached to it like so:
+
+```ruby
+FelECS::Entities.group(@component_manager_one, @component_manager_two).do |cmp1, cmp2, ent|
+ # do stuff with the components and entity
+end
+
+# or
+
+FelECS::Entities.group(@mgr1, @mgr2, @mgr3, @mgr4).do |cmp1, cmp2, cmp3, cmp4, ent|
+ # do stuff with the components and entity
+end
+
+# or
+
+FelECS::Entities.group(@component_manager_one).do |cmp1, ent|
+ # do stuff with the component and entity
+end
+
+# etc
+```
+
+You can use any number of component managers and it will only iterate over all entities that have at least all these components from these managers attached to them. The arguments in the block(the arguments surrounded by |pipes|) always correspond to each component manager passed as parameters into the group method and then followed by the entity object.
+This means there will be a number of these arguments equal to the number of component managers passed into the group method plus one for the entity.
+
### Deletion
To have all Components from an Entity **removed** and the Entity deleted we do the following:
diff --git a/docs/CNAME b/docs/CNAME
deleted file mode 100644
index 0b0c608..0000000
--- a/docs/CNAME
+++ /dev/null
@@ -1 +0,0 @@
-felflame.tradam.fyi \ No newline at end of file
diff --git a/docs/FelECS.html b/docs/FelECS.html
index 0e3e334..62efd37 100644
--- a/docs/FelECS.html
+++ b/docs/FelECS.html
@@ -325,7 +325,7 @@
</div>
<div id="footer">
- Generated on Wed Feb 2 03:29:07 2022 by
+ Generated on Thu Feb 3 03:45:34 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/FelECS/ComponentManager.html b/docs/FelECS/ComponentManager.html
index 5179b58..fb78748 100644
--- a/docs/FelECS/ComponentManager.html
+++ b/docs/FelECS/ComponentManager.html
@@ -1229,7 +1229,7 @@
</div>
<div id="footer">
- Generated on Wed Feb 2 03:29:07 2022 by
+ Generated on Thu Feb 3 03:45:35 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/FelECS/Components.html b/docs/FelECS/Components.html
index b1e0185..e58decc 100644
--- a/docs/FelECS/Components.html
+++ b/docs/FelECS/Components.html
@@ -327,7 +327,7 @@
</div>
<div id="footer">
- Generated on Wed Feb 2 03:29:07 2022 by
+ Generated on Thu Feb 3 03:45:34 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/FelECS/Entities.html b/docs/FelECS/Entities.html
index ac43403..6a5045c 100644
--- a/docs/FelECS/Entities.html
+++ b/docs/FelECS/Entities.html
@@ -121,6 +121,39 @@
<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="#group-class_method" title="group (class method)">.<strong>group</strong>(*component_managers, &amp;block) &#x21d2; Nil </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Selects every entity that has components of they type passed into this function and then executes the code block for those components and entities.</p>
+</div></span>
+
+</li>
+
+
+ </ul>
+
+ <h2>
Instance Method Summary
<small><a href="#" class="summary_toggle">collapse</a></small>
</h2>
@@ -347,6 +380,116 @@
</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="group-class_method">
+
+ .<strong>group</strong>(*component_managers, &amp;block) &#x21d2; <tt>Nil</tt>
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+
+<p>Selects every entity that has components of they type passed into this function and then executes the code block for those components and entities.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Nil</tt>)</span>
+
+
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/felecs/entity_manager.rb', line 107</span>
+
+<span class='kw'>def</span> <span class='id identifier rubyid_group'>group</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_component_managers'>component_managers</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_component_managers'>component_managers</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
+ <span class='kw'>if</span> <span class='id identifier rubyid_component_managers'>component_managers</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>==</span> <span class='int'>1</span>
+ <span class='id identifier rubyid_component_managers'>component_managers</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</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'>cmp</span><span class='op'>|</span>
+ <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_cmp'>cmp</span><span class='comma'>,</span> <span class='id identifier rubyid_cmp'>cmp</span><span class='period'>.</span><span class='id identifier rubyid_entity'>entity</span><span class='rparen'>)</span>
+ <span class='kw'>end</span>
+ <span class='kw'>else</span>
+ <span class='id identifier rubyid_arry'>arry</span> <span class='op'>=</span> <span class='id identifier rubyid_component_managers'>component_managers</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_cmp'>cmp</span><span class='op'>|</span>
+ <span class='id identifier rubyid_ent'>ent</span> <span class='op'>=</span> <span class='id identifier rubyid_cmp'>cmp</span><span class='period'>.</span><span class='id identifier rubyid_entity'>entity</span>
+ <span class='id identifier rubyid_keep'>keep</span> <span class='op'>=</span> <span class='kw'>true</span>
+ <span class='id identifier rubyid_component_managers'>component_managers</span><span class='period'>.</span><span class='id identifier rubyid_drop'>drop</span><span class='lparen'>(</span><span class='int'>1</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_mgr'>mgr</span><span class='op'>|</span>
+ <span class='kw'>next</span> <span class='kw'>unless</span> <span class='id identifier rubyid_ent'>ent</span><span class='period'>.</span><span class='id identifier rubyid_components'>components</span><span class='lbracket'>[</span><span class='id identifier rubyid_mgr'>mgr</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
+ <span class='id identifier rubyid_keep'>keep</span> <span class='op'>=</span> <span class='kw'>false</span>
+ <span class='kw'>break</span>
+ <span class='kw'>end</span>
+ <span class='id identifier rubyid_keep'>keep</span>
+ <span class='kw'>end</span>
+ <span class='id identifier rubyid_arry'>arry</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'>cmp</span><span class='op'>|</span>
+ <span class='id identifier rubyid_ent'>ent</span> <span class='op'>=</span> <span class='id identifier rubyid_cmp'>cmp</span><span class='period'>.</span><span class='id identifier rubyid_entity'>entity</span>
+ <span class='id identifier rubyid_cmp_arry'>cmp_arry</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_cmp'>cmp</span><span class='rbracket'>]</span>
+ <span class='id identifier rubyid_component_managers'>component_managers</span><span class='period'>.</span><span class='id identifier rubyid_drop'>drop</span><span class='lparen'>(</span><span class='int'>1</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_cmp_mgr'>cmp_mgr</span><span class='op'>|</span>
+ <span class='id identifier rubyid_cmp_arry'>cmp_arry</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span> <span class='id identifier rubyid_ent'>ent</span><span class='period'>.</span><span class='id identifier rubyid_component'>component</span><span class='lbracket'>[</span><span class='id identifier rubyid_cmp_mgr'>cmp_mgr</span><span class='rbracket'>]</span>
+ <span class='kw'>end</span>
+ <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_cmp_arry'>cmp_arry</span><span class='comma'>,</span> <span class='id identifier rubyid_ent'>ent</span><span class='rparen'>)</span>
+ <span class='kw'>end</span>
+ <span class='kw'>end</span>
+ <span class='kw'>nil</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>
@@ -782,7 +925,7 @@
</div>
<div id="footer">
- Generated on Wed Feb 2 03:29:07 2022 by
+ Generated on Thu Feb 3 03:45:34 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/FelECS/Order.html b/docs/FelECS/Order.html
index 9438239..6dd5c97 100644
--- a/docs/FelECS/Order.html
+++ b/docs/FelECS/Order.html
@@ -241,7 +241,7 @@
</div>
<div id="footer">
- Generated on Wed Feb 2 03:29:07 2022 by
+ Generated on Thu Feb 3 03:45:34 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/FelECS/Scenes.html b/docs/FelECS/Scenes.html
index c42be77..d11b129 100644
--- a/docs/FelECS/Scenes.html
+++ b/docs/FelECS/Scenes.html
@@ -755,7 +755,7 @@
</div>
<div id="footer">
- Generated on Wed Feb 2 03:29:07 2022 by
+ Generated on Thu Feb 3 03:45:35 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/FelECS/Stage.html b/docs/FelECS/Stage.html
index 4386c1a..02b1f70 100644
--- a/docs/FelECS/Stage.html
+++ b/docs/FelECS/Stage.html
@@ -562,7 +562,7 @@
</div>
<div id="footer">
- Generated on Wed Feb 2 03:29:07 2022 by
+ Generated on Thu Feb 3 03:45:34 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/FelECS/Systems.html b/docs/FelECS/Systems.html
index 9024a56..f4ef7ac 100644
--- a/docs/FelECS/Systems.html
+++ b/docs/FelECS/Systems.html
@@ -1495,7 +1495,7 @@
</div>
<div id="footer">
- Generated on Wed Feb 2 03:29:07 2022 by
+ Generated on Thu Feb 3 03:45:35 2022 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.26 (ruby-2.7.3).
</div>
diff --git a/docs/FelFlame.html b/docs/FelFlame.html
deleted file mode 100644
index 439094e..0000000
--- a/docs/FelFlame.html
+++ /dev/null
@@ -1,319 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>
- Module: FelFlame
-
- &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 = "FelFlame";
- 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">FelFlame</span>
-
-</div>
-
- <div id="search">
-
- <a class="full_list_link" id="class_list_link"
- href="class_list.html">
-
- <svg width="24" height="24">
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
- </svg>
- </a>
-
-</div>
- <div class="clear"></div>
- </div>
-
- <div id="content"><h1>Module: FelFlame
-
-
-
-</h1>
-<div class="box_info">
-
-
-
-
-
-
-
-
-
-
-
- <dl>
- <dt>Defined in:</dt>
- <dd>lib/felflame.rb<span class="defines">,<br />
- lib/felflame/order.rb,<br /> lib/felflame/scene_manager.rb,<br /> lib/felflame/stage_manager.rb,<br /> lib/felflame/entity_manager.rb,<br /> lib/felflame/system_manager.rb,<br /> lib/felflame/component_manager.rb</span>
-</dd>
- </dl>
-
-</div>
-
-<h2>Overview</h2><div class="docstring">
- <div class="discussion">
-
-<p>The FelFlame namespace where all its functionality resides under.</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="FelFlame/Components.html" title="FelFlame::Components (module)">Components</a></span>, <span class='object_link'><a href="FelFlame/Order.html" title="FelFlame::Order (module)">Order</a></span>, <span class='object_link'><a href="FelFlame/Stage.html" title="FelFlame::Stage (module)">Stage</a></span>
-
-
-
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="FelFlame/ComponentManager.html" title="FelFlame::ComponentManager (class)">ComponentManager</a></span>, <span class='object_link'><a href="FelFlame/Entities.html" title="FelFlame::Entities (class)">Entities</a></span>, <span class='object_link'><a href="FelFlame/Scenes.html" title="FelFlame::Scenes (class)">Scenes</a></span>, <span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::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="FelFlame/Entities.html" title="FelFlame::Entities (class)">Entities</a></span></p>
-
-
- </div>
-</div>
-<div class="tags">
-
-
-</div>
- </dt>
- <dd><pre class="code"><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Entities.html" title="FelFlame::Entities (class)">Entities</a></span></span></pre></dd>
-
- <dt id="Cmp-constant" class="">Cmp =
- <div class="docstring">
- <div class="discussion">
-
-<p>An alias for <span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">Components</a></span></p>
-
-
- </div>
-</div>
-<div class="tags">
-
-
-</div>
- </dt>
- <dd><pre class="code"><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Components.html" title="FelFlame::Components (module)">Components</a></span></span></pre></dd>
-
- <dt id="Sys-constant" class="">Sys =
- <div class="docstring">
- <div class="discussion">
-
-<p>An alias for <span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></p>
-
-
- </div>
-</div>
-<div class="tags">
-
-
-</div>
- </dt>
- <dd><pre class="code"><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Systems.html" title="FelFlame::Systems (class)">Systems</a></span></span></pre></dd>
-
- <dt id="Scn-constant" class="">Scn =
- <div class="docstring">
- <div class="discussion">
-
-<p>An alias for <span class='object_link'><a href="FelFlame/Scenes.html" title="FelFlame::Scenes (class)">Scenes</a></span></p>
-
-
- </div>
-</div>
-<div class="tags">
-
-
-</div>
- </dt>
- <dd><pre class="code"><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Scenes.html" title="FelFlame::Scenes (class)">Scenes</a></span></span></pre></dd>
-
- <dt id="Stg-constant" class="">Stg =
- <div class="docstring">
- <div class="discussion">
-
-<p>An alias for <span class='object_link'><a href="FelFlame/Stage.html" title="FelFlame::Stage (module)">Stage</a></span></p>
-
-
- </div>
-</div>
-<div class="tags">
-
-
-</div>
- </dt>
- <dd><pre class="code"><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Stage.html" title="FelFlame::Stage (module)">Stage</a></span></span></pre></dd>
-
- <dt id="Odr-constant" class="">Odr =
- <div class="docstring">
- <div class="discussion">
- <dl class="rdoc-list note-list"><dt>An alias for {FelFlame
-<dd></dd></dl>
-
-
- </div>
-</div>
-<div class="tags">
-
-
-</div>
- </dt>
- <dd><pre class="code"><span class='const'>FelFlame</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Order.html" title="FelFlame::Order (module)">Order</a></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="FelFlame/Stage.html#call-class_method" title="FelFlame::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="FelFlame/Stage.html#call-class_method" title="FelFlame::Stage.call (method)">FelFlame::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/felflame.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="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FelFlame/Stage.html" title="FelFlame::Stage (module)">Stage</a></span></span><span class='period'>.</span><span class='id identifier rubyid_call'><span class='object_link'><a href="FelFlame/Stage.html#call-class_method" title="FelFlame::Stage.call (method)">call</a></span></span>
-<span class='kw'>end</span></pre>
- </td>
- </tr>
-</table>
-</div>
-
- </div>
-
-</div>
-
- <div id="footer">
- Generated on Mon Jan 3 08:23:04 2022 by
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.9.26 (ruby-2.7.3).
-</div>
-
- </div>
- </body>
-</html> \ No newline at end of file
diff --git a/docs/FelFlame/ComponentManager.html b/docs/FelFlame/ComponentManager.html
deleted file mode 100644
index 19891af..0000000
--- a/docs/FelFlame/ComponentManager.html
+++ /dev/null
@@ -1,1239 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>
- Class: FelFlame::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 = "FelFlame::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="../FelFlame.html" title="FelFlame (module)">FelFlame</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: FelFlame::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">FelFlame::ComponentManager</li>
-
- </ul>
- <a href="#" class="inheritanceTree">show all</a>
-
- </dd>
- </dl>
-
-
-
-
-
-
-
-
-
-
-
- <dl>
- <dt>Defined in:</dt>
- <dd>lib/felflame/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="FelFlame::ComponentManager#to_h (method)">#to_h</a></span> and <span class='object_link'><a href="#update_attrs-instance_method" title="FelFlame::ComponentManager#update_attrs (method)">#update_attrs</a></span> methods instead.</p>
-
-
- </div>
-</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">
-
-
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 132</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 FelFlame::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 FelFlame 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">
-
-
-180
-181
-182</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 180</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 FelFlame 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">
-
-
-196
-197
-198</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 196</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 FelFlame 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">
-
-
-188
-189
-190</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 188</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 FelFlame 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">
-
-
-109
-110
-111</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 109</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 FelFlame 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">
-
-
-125
-126
-127</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 125</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 FelFlame 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">
-
-
-117
-118
-119</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 117</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">
-
-
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 247</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">
-
-
-209
-210
-211</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 209</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">
-
-
-215
-216
-217
-218
-219
-220
-221
-222</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 215</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">
-
-
-262
-263
-264
-265
-266
-267
-268</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 262</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">
-
-
-226
-227
-228
-229
-230</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 226</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 Mon Jan 3 08:23:04 2022 by
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.9.26 (ruby-2.7.3).
-</div>
-
- </div>
- </body>
-</html> \ No newline at end of file
diff --git a/docs/FelFlame/Components.html b/docs/FelFlame/Components.html
deleted file mode 100644
index be924da..0000000
--- a/docs/FelFlame/Components.html
+++ /dev/null
@@ -1,333 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>
- Module: FelFlame::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 = "FelFlame::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="../FelFlame.html" title="FelFlame (module)">FelFlame</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: FelFlame::Components
-
-
-
-</h1>
-<div class="box_info">
-
-
-
-
-
-
-
-
-
-
-
- <dl>
- <dt>Defined in:</dt>
- <dd>lib/felflame.rb<span class="defines">,<br />
- lib/felflame/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="FelFlame::Components (module)">Components</a></span> namespace as Constants. You can use array methods directly on this class to access Component Managers.</p>
-
-<p>To see how component managers are used please look at the <span class='object_link'><a href="ComponentManager.html" title="FelFlame::ComponentManager (class)">ComponentManager</a></span> documentation.</p>
-
-
- </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="FelFlame::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="FelFlame::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="FelFlame::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="../FelFlame.html" title="FelFlame (module)">FelFlame</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="FelFlame::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</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'lib/felflame/component_manager.rb', line 20</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_attrs'>attrs</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_attrs_with_defaults'>attrs_with_defaults</span><span class='rparen'>)</span>
- <span class='kw'>if</span> <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_defined?'>const_defined?</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_raise'>raise</span><span class='lparen'>(</span><span class='const'>NameError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&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="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="ComponentManager.html" title="FelFlame::ComponentManager (class)">ComponentManager</a></span></span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_update_const_cache'>update_const_cache</span>
-
- <span class='id identifier rubyid_attrs'>attrs</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_attr'>attr</span><span class='op'>|</span>
- <span class='kw'>if</span> <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_method_defined?'>method_defined?</span><span class='lparen'>(</span><span class='id identifier rubyid_attr'>attr</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_method_defined?'>method_defined?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&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="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_attr_accessor'>attr_accessor</span> <span class='id identifier rubyid_attr'>attr</span>
- <span class='kw'>end</span>
- <span class='id identifier rubyid_attrs_with_defaults'>attrs_with_defaults</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_attr'>attr</span><span class='comma'>,</span> <span class='id identifier rubyid__default'>_default</span><span class='op'>|</span>
- <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="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='id identifier rubyid_attr'>attr</span>
- <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_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='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'>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='kw'>end</span>
- <span class='kw'>end</span>
- <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_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="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Components (module)">Components</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_component_name'>component_name</span><span class='rparen'>)</span>
-<span class='kw'>end</span></pre>
- </td>
- </tr>
-</table>
-</div>
-
- </div>
-
-</div>
-
- <div id="footer">
- Generated on Mon Jan 3 08:23:04 2022 by
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.9.26 (ruby-2.7.3).
-</div>
-
- </div>
- </body>
-</html> \ No newline at end of file
diff --git a/docs/FelFlame/Entities.html b/docs/FelFlame/Entities.html
deleted file mode 100644
index 37a9d84..0000000
--- a/docs/FelFlame/Entities.html
+++ /dev/null
@@ -1,792 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>
- Class: FelFlame::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 = "FelFlame::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="../FelFlame.html" title="FelFlame (module)">FelFlame</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: FelFlame::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">FelFlame::Entities</li>
-
- </ul>
- <a href="#" class="inheritanceTree">show all</a>
-
- </dd>
- </dl>
-
-
-
-
-
-
-
-
-
-
-
- <dl>
- <dt>Defined in:</dt>
- <dd>lib/felflame.rb<span class="defines">,<br />
- lib/felflame/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="FelFlame::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/felflame/entity_manager.rb', line 8</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_components'>components</span><span class='rparen'>)</span>
- <span class='comment'># Add each component
-</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/felflame/entity_manager.rb', line 57</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_components_to_add'>components_to_add</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_components_to_add'>components_to_add</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_component'>component</span><span class='op'>|</span>
- <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="FelFlame::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/felflame/entity_manager.rb', line 26</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_component'>component</span><span class='lparen'>(</span><span class='id identifier rubyid_manager'>manager</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
- <span class='kw'>if</span> <span class='id identifier rubyid_manager'>manager</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
- <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::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="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::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/felflame/entity_manager.rb', line 16</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_components'>components</span>
- <span class='ivar'>@components</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
-<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/felflame/entity_manager.rb', line 43</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span>
- <span class='id identifier rubyid_components'>components</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid__component_manager'>_component_manager</span><span class='comma'>,</span> <span class='id identifier rubyid_component_array'>component_array</span><span class='op'>|</span>
- <span class='id identifier rubyid_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="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::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/felflame/entity_manager.rb', line 87</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_remove'>remove</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_components_to_remove'>components_to_remove</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_components_to_remove'>components_to_remove</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_component'>component</span><span class='op'>|</span>
- <span class='id identifier rubyid_check_systems'>check_systems</span> <span class='id identifier rubyid_component'>component</span><span class='comma'>,</span> <span class='symbol'>:removal_triggers</span> <span class='kw'>if</span> <span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_entities'>entities</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='kw'>self</span>
- <span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_entities'>entities</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='kw'>self</span>
- <span class='id identifier rubyid_components'>components</span><span class='lbracket'>[</span><span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='id identifier rubyid_component'>component</span>
- <span class='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 Mon Jan 3 08:23:04 2022 by
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.9.26 (ruby-2.7.3).
-</div>
-
- </div>
- </body>
-</html> \ No newline at end of file
diff --git a/docs/FelFlame/Helper.html b/docs/FelFlame/Helper.html
deleted file mode 100644
index acb3005..0000000
--- a/docs/FelFlame/Helper.html
+++ /dev/null
@@ -1,142 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>
- Class: FelFlame::Helper
-
- &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 = "FelFlame::Helper";
- 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 (H)</a> &raquo;
- <span class='title'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span>
- &raquo;
- <span class="title">Helper</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: FelFlame::Helper
-
-
-
-</h1>
-<div class="box_info">
-
- <dl>
- <dt>Inherits:</dt>
- <dd>
- <span class="inheritName">Object</span>
-
- <ul class="fullTree">
- <li>Object</li>
-
- <li class="next">FelFlame::Helper</li>
-
- </ul>
- <a href="#" class="inheritanceTree">show all</a>
-
- </dd>
- </dl>
-
-
-
-
-
-
-
-
-
-
-
- <dl>
- <dt>Defined in:</dt>
- <dd>component_manager.rb</dd>
- </dl>
-
-</div>
-
-<h2>Overview</h2><div class="docstring">
- <div class="discussion">
-
-<p>Namespace for helper functions and template classes</p>
-
-
- </div>
-</div>
-<div class="tags">
-
-
-</div><h2>Defined Under Namespace</h2>
-<p class="children">
-
-
-
-
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="Helper/ComponentManager.html" title="FelFlame::Helper::ComponentManager (class)">ComponentManager</a></span>
-
-
-</p>
-
-
-
-
-
-
-
-
-
-</div>
-
- <div id="footer">
- Generated on Wed Jul 7 12:27:30 2021 by
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.9.26 (ruby-2.7.3).
-</div>
-
- </div>
- </body>
-</html> \ No newline at end of file
diff --git a/docs/FelFlame/Helper/ComponentManager.html b/docs/FelFlame/Helper/ComponentManager.html
deleted file mode 100644
index 1a04d45..0000000
--- a/docs/FelFlame/Helper/ComponentManager.html
+++ /dev/null
@@ -1,1627 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>
- Class: FelFlame::Helper::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 = "FelFlame::Helper::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="../../FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Helper.html" title="FelFlame::Helper (class)">Helper</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: FelFlame::Helper::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">FelFlame::Helper::ComponentManager</li>
-
- </ul>
- <a href="#" class="inheritanceTree">show all</a>
-
- </dd>
- </dl>
-
-
-
-
-
-
-
-
-
-
-
- <dl>
- <dt>Defined in:</dt>
- <dd>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="#attrs-instance_method" title="FelFlame::Helper::ComponentManager#attrs (method)">#attrs</a></span> and <span class='object_link'><a href="#update_attrs-instance_method" title="FelFlame::Helper::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="#id-instance_method" title="#id (instance method)">#<strong>id</strong> &#x21d2; Integer </a>
-
-
-
- </span>
-
-
-
-
- <span class="note title readonly">readonly</span>
-
-
-
-
-
-
-
-
-
- <span class="summary_desc"><div class='inline'>
-<p>Holds the <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">unique ID</a></span> of a component.</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>
- 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="#[]-class_method" title="[] (class method)">.<strong>[]</strong>(component_id) &#x21d2; Component </a>
-
-
-
- </span>
-
-
-
-
-
-
-
-
-
- <span class="summary_desc"><div class='inline'>
-<p>Gets a Component from the given <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">unique ID</a></span>.</p>
-</div></span>
-
-</li>
-
-
- <li class="public ">
- <span class="summary_signature">
-
- <a href="#each-class_method" title="each (class method)">.<strong>each</strong>(&amp;block) &#x21d2; Enumerator </a>
-
-
-
- </span>
-
-
-
-
-
-
-
-
-
- <span class="summary_desc"><div class='inline'>
-<p>Iterates over all components within the component manager.</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="#attr_changed_trigger_systems-instance_method" title="#attr_changed_trigger_systems (instance method)">#<strong>attr_changed_trigger_systems</strong>(attr) &#x21d2; Boolean </a>
-
-
-
- </span>
-
-
-
-
-
-
-
-
-
- <span class="summary_desc"><div class='inline'>
-<p>Execute systems that have been added to execute on variable change.</p>
-</div></span>
-
-</li>
-
-
- <li class="public ">
- <span class="summary_signature">
-
- <a href="#attrs-instance_method" title="#attrs (instance method)">#<strong>attrs</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 linked to their respective values.</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 component from the list and purges all references to this Component from other Entities, as well as its <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">ID</a></span> and 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;Integer&gt; </a>
-
-
-
- </span>
-
-
-
-
-
-
-
-
-
- <span class="summary_desc"><div class='inline'>
-<p>A list of entity ids that are linked to the component.</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_i-instance_method" title="#to_i (instance method)">#<strong>to_i</strong> &#x21d2; Integer </a>
-
-
-
- </span>
-
-
-
-
-
-
-
-
-
- <span class="summary_desc"><div class='inline'>
-<p>An alias for the <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">ID Reader</a></span>.</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">
-
-
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'component_manager.rb', line 104</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 FelFlame::Components
-</span> <span class='id identifier rubyid_set_defaults'>set_defaults</span>
-
- <span class='comment'># Generate ID
-</span> <span class='id identifier rubyid_new_id'>new_id</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_find_index'>find_index</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span> <span class='id identifier rubyid_i'>i</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='rbrace'>}</span>
- <span class='id identifier rubyid_new_id'>new_id</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='kw'>if</span> <span class='id identifier rubyid_new_id'>new_id</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
- <span class='ivar'>@id</span> <span class='op'>=</span> <span class='id identifier rubyid_new_id'>new_id</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_data'>data</span><span class='lbracket'>[</span><span class='id identifier rubyid_new_id'>new_id</span><span class='rbracket'>]</span> <span class='op'>=</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 FelFlame 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">
-
-
-136
-137
-138</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'component_manager.rb', line 136</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 FelFlame 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">
-
-
-152
-153
-154</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'component_manager.rb', line 152</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 FelFlame 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">
-
-
-144
-145
-146</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'component_manager.rb', line 144</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 FelFlame 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">
-
-
-81
-82
-83</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'component_manager.rb', line 81</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 FelFlame 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">
-
-
-97
-98
-99</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'component_manager.rb', line 97</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="id=-instance_method"></span>
- <div class="method_details ">
- <h3 class="signature " id="id-instance_method">
-
- #<strong>id</strong> &#x21d2; <tt>Integer</tt>
-
-
-
-
-
-</h3><div class="docstring">
- <div class="discussion">
-
-<p>Holds the <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">unique ID</a></span> of a component. The <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">ID</a></span> is only unique within the scope of the component manager it was created from.</p>
-
-
- </div>
-</div>
-<div class="tags">
-
-<p class="tag_title">Returns:</p>
-<ul class="return">
-
- <li>
-
-
- <span class='type'>(<tt>Integer</tt>)</span>
-
-
-
- </li>
-
-</ul>
-
-</div><table class="source_code">
- <tr>
- <td>
- <pre class="lines">
-
-
-63
-64
-65</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'component_manager.rb', line 63</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
- <span class='ivar'>@id</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 FelFlame 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">
-
-
-89
-90
-91</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'component_manager.rb', line 89</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="class_method_details" class="method_details_list">
- <h2>Class Method Details</h2>
-
-
- <div class="method_details first">
- <h3 class="signature first" id="[]-class_method">
-
- .<strong>[]</strong>(component_id) &#x21d2; <tt>Component</tt>
-
-
-
-
-
-</h3><div class="docstring">
- <div class="discussion">
-
-<p>Gets a Component from the given <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">unique ID</a></span>. Usage is simular to how an Array lookup works.</p>
-
-
- </div>
-</div>
-<div class="tags">
-
- <div class="examples">
- <p class="tag_title">Examples:</p>
-
-
- <pre class="example code"><code><span class='comment'># this gets the &#39;Health&#39; Component with ID 7
-</span><span class='const'><span class='object_link'><a href="../../FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Components.html" title="FelFlame::Components (class)">Components</a></span></span><span class='op'>::</span><span class='const'>Health</span><span class='lbracket'>[</span><span class='int'>7</span><span class='rbracket'>]</span></code></pre>
-
- </div>
-<p class="tag_title">Parameters:</p>
-<ul class="param">
-
- <li>
-
- <span class='name'>component_id</span>
-
-
- <span class='type'>(<tt>Integer</tt>)</span>
-
-
-
- </li>
-
-</ul>
-
-<p class="tag_title">Returns:</p>
-<ul class="return">
-
- <li>
-
-
- <span class='type'>(<tt>Component</tt>)</span>
-
-
-
- &mdash;
- <div class='inline'>
-<p>Returns the Component that uses the given unique <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">ID</a></span>, nil if there is no Component associated with the given <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">ID</a></span></p>
-</div>
-
- </li>
-
-</ul>
-
-</div><table class="source_code">
- <tr>
- <td>
- <pre class="lines">
-
-
-169
-170
-171</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'component_manager.rb', line 169</span>
-
-<span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span><span class='id identifier rubyid_component_id'>component_id</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='id identifier rubyid_component_id'>component_id</span><span class='rbracket'>]</span>
-<span class='kw'>end</span></pre>
- </td>
- </tr>
-</table>
-</div>
-
- <div class="method_details ">
- <h3 class="signature " id="each-class_method">
-
- .<strong>each</strong>(&amp;block) &#x21d2; <tt>Enumerator</tt>
-
-
-
-
-
-</h3><div class="docstring">
- <div class="discussion">
-
-<p>Iterates over all components within the component manager. Special Enumerable methods like <code>map</code> or <code>each_with_index</code> are not implemented</p>
-
-
- </div>
-</div>
-<div class="tags">
-
-<p class="tag_title">Returns:</p>
-<ul class="return">
-
- <li>
-
-
- <span class='type'>(<tt>Enumerator</tt>)</span>
-
-
-
- </li>
-
-</ul>
-
-</div><table class="source_code">
- <tr>
- <td>
- <pre class="lines">
-
-
-176
-177
-178</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'component_manager.rb', line 176</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</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="attr_changed_trigger_systems-instance_method">
-
- #<strong>attr_changed_trigger_systems</strong>(attr) &#x21d2; <tt>Boolean</tt>
-
-
-
-
-
-</h3><div class="docstring">
- <div class="discussion">
-
-<p>Execute systems that have been added to execute on variable change</p>
-
-
- </div>
-</div>
-<div class="tags">
-
-<p class="tag_title">Returns:</p>
-<ul class="return">
-
- <li>
-
-
- <span class='type'>(<tt>Boolean</tt>)</span>
-
-
-
- &mdash;
- <div class='inline'>
-<p><code>true</code></p>
-</div>
-
- </li>
-
-</ul>
-
-</div><table class="source_code">
- <tr>
- <td>
- <pre class="lines">
-
-
-203
-204
-205
-206
-207
-208
-209
-210
-211</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'component_manager.rb', line 203</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_attr_changed_trigger_systems'>attr_changed_trigger_systems</span><span class='lparen'>(</span><span class='id identifier rubyid_attr'>attr</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_systems_to_execute'>systems_to_execute</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span>
- <span class='id identifier rubyid_systems_to_execute'>systems_to_execute</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_systems_to_execute'>systems_to_execute</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
-
- <span class='id identifier rubyid_systems_to_execute'>systems_to_execute</span> <span class='op'>|=</span> <span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
-
- <span class='id identifier rubyid_systems_to_execute'>systems_to_execute</span><span class='period'>.</span><span class='id identifier rubyid_sort_by'>sort_by</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:priority</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_reverse'>reverse</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="attrs-instance_method">
-
- #<strong>attrs</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 linked to 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 linked to their respective values.</p>
-</div>
-
- </li>
-
-</ul>
-
-</div><table class="source_code">
- <tr>
- <td>
- <pre class="lines">
-
-
-234
-235
-236
-237
-238
-239
-240</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'component_manager.rb', line 234</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_attrs'>attrs</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="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 <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">ID</a></span> and 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">
-
-
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'component_manager.rb', line 215</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='comment'># This needs to be cloned because indices get deleted as
-</span> <span class='comment'># the remove command is called, breaking the loop if it
-</span> <span class='comment'># wasn&#39;t referencing a clone(will get Nil errors)
-</span> <span class='id identifier rubyid_iter'>iter</span> <span class='op'>=</span> <span class='id identifier rubyid_entities'>entities</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:clone</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_iter'>iter</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_entity_id'>entity_id</span><span class='op'>|</span>
- <span class='const'><span class='object_link'><a href="../../FelFlame.html" title="FelFlame (class)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Entities.html" title="FelFlame::Entities (class)">Entities</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_entity_id'>entity_id</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_remove'>remove</span> <span class='kw'>self</span> <span class='comment'>#unless FelFlame::Entities[entity_id].nil?
-</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='lbracket'>[</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>nil</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;Integer&gt;</tt>
-
-
-
-
-
-</h3><div class="docstring">
- <div class="discussion">
-
-<p>A list of entity ids that are linked to the component</p>
-
-
- </div>
-</div>
-<div class="tags">
-
-<p class="tag_title">Returns:</p>
-<ul class="return">
-
- <li>
-
-
- <span class='type'>(<tt>Array&lt;Integer&gt;</tt>)</span>
-
-
-
- </li>
-
-</ul>
-
-</div><table class="source_code">
- <tr>
- <td>
- <pre class="lines">
-
-
-189
-190
-191</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'component_manager.rb', line 189</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="to_i-instance_method">
-
- #<strong>to_i</strong> &#x21d2; <tt>Integer</tt>
-
-
-
-
-
-</h3><div class="docstring">
- <div class="discussion">
-
-<p>An alias for the <span class='object_link'><a href="#id-instance_method" title="FelFlame::Helper::ComponentManager#id (method)">ID Reader</a></span></p>
-
-
- </div>
-</div>
-<div class="tags">
-
-<p class="tag_title">Returns:</p>
-<ul class="return">
-
- <li>
-
-
- <span class='type'>(<tt>Integer</tt>)</span>
-
-
-
- </li>
-
-</ul>
-
-</div><table class="source_code">
- <tr>
- <td>
- <pre class="lines">
-
-
-183
-184
-185</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'component_manager.rb', line 183</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_to_i'>to_i</span>
- <span class='id identifier rubyid_id'>id</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">
-
-
-195
-196
-197
-198
-199</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'component_manager.rb', line 195</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 Wed Jul 7 12:27:30 2021 by
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.9.26 (ruby-2.7.3).
-</div>
-
- </div>
- </body>
-</html> \ No newline at end of file
diff --git a/docs/FelFlame/Order.html b/docs/FelFlame/Order.html
deleted file mode 100644
index 832e16f..0000000
--- a/docs/FelFlame/Order.html
+++ /dev/null
@@ -1,251 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>
- Module: FelFlame::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 = "FelFlame::Order";
- relpath = '../';
-</script>
-
-
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
-
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
-
-
- </head>
- <body>
- <div class="nav_wrap">
- <iframe id="nav" src="../class_list.html?1"></iframe>
- <div id="resizer"></div>
- </div>
-
- <div id="main" tabindex="-1">
- <div id="header">
- <div id="menu">
-
- <a href="../_index.html">Index (O)</a> &raquo;
- <span class='title'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</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: FelFlame::Order
-
-
-
-</h1>
-<div class="box_info">
-
-
-
-
-
-
-
-
-
-
-
- <dl>
- <dt>Defined in:</dt>
- <dd>lib/felflame.rb<span class="defines">,<br />
- lib/felflame/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="FelFlame::Systems (class)">Systems</a></span> and Array&lt;<span class='object_link'><a href="Systems.html" title="FelFlame::Systems (class)">Systems</a></span>&gt;) or (<span class='object_link'><a href="Scenes.html" title="FelFlame::Scenes (class)">Scenes</a></span> and Array&lt;<span class='object_link'><a href="Scenes.html" title="FelFlame::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/felflame/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 Mon Jan 3 08:23:04 2022 by
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.9.26 (ruby-2.7.3).
-</div>
-
- </div>
- </body>
-</html> \ No newline at end of file
diff --git a/docs/FelFlame/Scenes.html b/docs/FelFlame/Scenes.html
deleted file mode 100644
index 68f4ece..0000000
--- a/docs/FelFlame/Scenes.html
+++ /dev/null
@@ -1,765 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>
- Class: FelFlame::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 = "FelFlame::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="../FelFlame.html" title="FelFlame (module)">FelFlame</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: FelFlame::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">FelFlame::Scenes</li>
-
- </ul>
- <a href="#" class="inheritanceTree">show all</a>
-
- </dd>
- </dl>
-
-
-
-
-
-
-
-
-
-
-
- <dl>
- <dt>Defined in:</dt>
- <dd>lib/felflame.rb<span class="defines">,<br />
- lib/felflame/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="FelFlame::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="FelFlame::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/felflame/scene_manager.rb', line 22</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='label'>priority:</span> <span class='int'>0</span><span class='rparen'>)</span>
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_priority'>priority</span> <span class='op'>=</span> <span class='id identifier rubyid_priority'>priority</span>
- <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::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/felflame/scene_manager.rb', line 12</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_priority'>priority</span>
- <span class='ivar'>@priority</span>
-<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/felflame/scene_manager.rb', line 29</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_systems'>systems</span>
- <span class='ivar'>@systems</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
-<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/felflame/scene_manager.rb', line 42</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_systems_to_add'>systems_to_add</span><span class='rparen'>)</span>
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_systems'>systems</span> <span class='op'>|=</span> <span class='id identifier rubyid_systems_to_add'>systems_to_add</span>
- <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/felflame/scene_manager.rb', line 35</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span>
- <span class='id identifier rubyid_systems'>systems</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&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/felflame/scene_manager.rb', line 60</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_clear'>clear</span>
- <span class='id identifier rubyid_systems'>systems</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_system'>system</span><span class='op'>|</span>
- <span class='id identifier rubyid_system'>system</span><span class='period'>.</span><span class='id identifier rubyid_scenes'>scenes</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='kw'>self</span>
- <span class='kw'>end</span>
- <span class='id identifier rubyid_systems'>systems</span><span class='period'>.</span><span class='id identifier rubyid_clear'>clear</span>
- <span class='comment'># FelFlame::Stage.update_systems_list if FelFlame::Stage.scenes.include? self
-</span> <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/felflame/scene_manager.rb', line 53</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_remove'>remove</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_systems_to_remove'>systems_to_remove</span><span class='rparen'>)</span>
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_systems'>systems</span> <span class='op'>-=</span> <span class='id identifier rubyid_systems_to_remove'>systems_to_remove</span>
- <span class='kw'>true</span>
-<span class='kw'>end</span></pre>
- </td>
- </tr>
-</table>
-</div>
-
- </div>
-
-</div>
-
- <div id="footer">
- Generated on Mon Jan 3 08:23:04 2022 by
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.9.26 (ruby-2.7.3).
-</div>
-
- </div>
- </body>
-</html> \ No newline at end of file
diff --git a/docs/FelFlame/Stage.html b/docs/FelFlame/Stage.html
deleted file mode 100644
index 7dd9b26..0000000
--- a/docs/FelFlame/Stage.html
+++ /dev/null
@@ -1,572 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>
- Module: FelFlame::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 = "FelFlame::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="../FelFlame.html" title="FelFlame (module)">FelFlame</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: FelFlame::Stage
-
-
-
-</h1>
-<div class="box_info">
-
-
-
-
-
-
-
-
-
-
-
- <dl>
- <dt>Defined in:</dt>
- <dd>lib/felflame.rb<span class="defines">,<br />
- lib/felflame/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/felflame/stage_manager.rb', line 42</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_scenes'>scenes</span>
- <span class='ivar'>@scenes</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
-<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/felflame/stage_manager.rb', line 13</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_scenes_to_add'>scenes_to_add</span><span class='rparen'>)</span>
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scenes'>scenes</span> <span class='op'>|=</span> <span class='id identifier rubyid_scenes_to_add'>scenes_to_add</span>
- <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/felflame/stage_manager.rb', line 35</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span>
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scenes'>scenes</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&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/felflame/stage_manager.rb', line 28</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_clear'>clear</span>
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scenes'>scenes</span><span class='period'>.</span><span class='id identifier rubyid_clear'>clear</span>
- <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/felflame/stage_manager.rb', line 21</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_remove'>remove</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_scenes_to_remove'>scenes_to_remove</span><span class='rparen'>)</span>
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scenes'>scenes</span> <span class='op'>-=</span> <span class='id identifier rubyid_scenes_to_remove'>scenes_to_remove</span>
- <span class='kw'>true</span>
-<span class='kw'>end</span></pre>
- </td>
- </tr>
-</table>
-</div>
-
- </div>
-
-</div>
-
- <div id="footer">
- Generated on Mon Jan 3 08:23:04 2022 by
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.9.26 (ruby-2.7.3).
-</div>
-
- </div>
- </body>
-</html> \ No newline at end of file
diff --git a/docs/FelFlame/Systems.html b/docs/FelFlame/Systems.html
deleted file mode 100644
index d2fb24f..0000000
--- a/docs/FelFlame/Systems.html
+++ /dev/null
@@ -1,1505 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>
- Class: FelFlame::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 = "FelFlame::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="../FelFlame.html" title="FelFlame (module)">FelFlame</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: FelFlame::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">FelFlame::Systems</li>
-
- </ul>
- <a href="#" class="inheritanceTree">show all</a>
-
- </dd>
- </dl>
-
-
-
-
-
-
-
-
-
-
-
- <dl>
- <dt>Defined in:</dt>
- <dd>lib/felflame.rb<span class="defines">,<br />
- lib/felflame/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="FelFlame::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 FelFlame 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="FelFlame::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="FelFlame::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="FelFlame::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="FelFlame::Systems (class)">FelFlame::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="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Systems (class)">Systems</a></span></span><span class='period'>.</span><span class='id identifier rubyid_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="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Components.html" title="FelFlame::Components (module)">Components</a></span></span><span class='op'>::</span><span class='const'>Health</span><span class='period'>.</span><span class='id identifier rubyid_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/felflame/system_manager.rb', line 115</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='label'>priority:</span> <span class='int'>0</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
- <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Systems (class)">Systems</a></span></span><span class='period'>.</span><span class='id identifier rubyid_const_set'>const_set</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='kw'>self</span><span class='rparen'>)</span>
- <span class='const'><span class='object_link'><a href="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Systems (class)">Systems</a></span></span><span class='period'>.</span><span class='id identifier rubyid_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 FelFlame 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/felflame/system_manager.rb', line 35</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_addition_triggers'>addition_triggers</span>
- <span class='ivar'>@addition_triggers</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
-<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 FelFlame 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/felflame/system_manager.rb', line 52</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_attr_triggers'>attr_triggers</span>
- <span class='ivar'>@attr_triggers</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
-<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/felflame/system_manager.rb', line 6</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_priority'>priority</span>
- <span class='ivar'>@priority</span>
-<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 FelFlame 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/felflame/system_manager.rb', line 44</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_removal_triggers'>removal_triggers</span>
- <span class='ivar'>@removal_triggers</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
-<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/felflame/system_manager.rb', line 19</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_scenes'>scenes</span>
- <span class='ivar'>@scenes</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
-<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="FelFlame::Components (module)">Components</a></span>. This is needed because calling `FelFlame::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/felflame/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/felflame/system_manager.rb', line 124</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span>
- <span class='ivar'>@block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
-<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="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Systems (class)">Systems</a></span></span><span class='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="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Systems (class)">Systems</a></span></span><span class='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="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Systems (class)">Systems</a></span></span><span class='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="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Systems (class)">Systems</a></span></span><span class='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="../FelFlame.html" title="FelFlame (module)">FelFlame</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="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Systems (class)">Systems</a></span></span><span class='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="../FelFlame.html" title="FelFlame (module)">FelFlame</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="../FelFlame.html" title="FelFlame (module)">FelFlame</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="FelFlame::Systems (class)">Systems</a></span></span><span class='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="FelFlame::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/felflame/system_manager.rb', line 157</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_clear_triggers'>clear_triggers</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_trigger_types'>trigger_types</span><span class='comma'>,</span> <span class='label'>component_or_manager:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_trigger_types'>trigger_types</span> <span class='op'>=</span> <span class='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/felflame/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="FelFlame::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/felflame/system_manager.rb', line 227</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_trigger_when_added'>trigger_when_added</span><span class='lparen'>(</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rparen'>)</span>
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_addition_triggers'>addition_triggers</span> <span class='op'>|=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span>
- <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/felflame/system_manager.rb', line 244</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_trigger_when_is_changed'>trigger_when_is_changed</span><span class='lparen'>(</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='comma'>,</span> <span class='id identifier rubyid_attr'>attr</span><span class='rparen'>)</span>
- <span class='kw'>if</span> <span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='period'>.</span><span class='id identifier rubyid_attr_triggers'>attr_triggers</span><span class='lbracket'>[</span><span class='id identifier rubyid_attr'>attr</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
- <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="FelFlame::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/felflame/system_manager.rb', line 236</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_trigger_when_removed'>trigger_when_removed</span><span class='lparen'>(</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rparen'>)</span>
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_removal_triggers'>removal_triggers</span> <span class='op'>|=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_component_or_manager'>component_or_manager</span><span class='rbracket'>]</span>
- <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 Mon Jan 3 08:23:04 2022 by
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.9.26 (ruby-2.7.3).
-</div>
-
- </div>
- </body>
-</html> \ No newline at end of file
diff --git a/docs/Felflame_.html b/docs/Felflame_.html
deleted file mode 100644
index c748359..0000000
--- a/docs/Felflame_.html
+++ /dev/null
@@ -1,143 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>
- Module: Felflame
-
- &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 = "Felflame";
- 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">Felflame</span>
-
-</div>
-
- <div id="search">
-
- <a class="full_list_link" id="class_list_link"
- href="class_list.html">
-
- <svg width="24" height="24">
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
- </svg>
- </a>
-
-</div>
- <div class="clear"></div>
- </div>
-
- <div id="content"><h1>Module: Felflame
-
-
-
-</h1>
-<div class="box_info">
-
-
-
-
-
-
-
-
-
-
-
- <dl>
- <dt>Defined in:</dt>
- <dd>lib/felflame/version.rb</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>
- Constant Summary
- <small><a href="#" class="constants_summary_toggle">collapse</a></small>
- </h2>
-
- <dl class="constants">
-
- <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'>4.0.0</span><span class='tstring_end'>&#39;</span></span></pre></dd>
-
- </dl>
-
-
-
-
-
-
-
-
-
-
-</div>
-
- <div id="footer">
- Generated on Mon Jan 3 08:23:04 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 513f06d..8e128ed 100644
--- a/docs/_index.html
+++ b/docs/_index.html
@@ -178,7 +178,7 @@
</div>
<div id="footer">
- Generated on Wed Feb 2 03:29:07 2022 by
+ Generated on Thu Feb 3 03:45:34 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/file.README.html b/docs/file.README.html
index fdf4b37..6da1a7c 100644
--- a/docs/file.README.html
+++ b/docs/file.README.html
@@ -550,7 +550,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera. </p>
</div></div>
<div id="footer">
- Generated on Wed Feb 2 03:29:07 2022 by
+ Generated on Thu Feb 3 03:45:34 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/file.version.html b/docs/file.version.html
deleted file mode 100644
index 4bc29ad..0000000
--- a/docs/file.version.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="UTF-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>
- File: version
-
- &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 = "version";
- 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="file_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</a> &raquo;
- <span class="title">File: version</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"><div id='filecontents'><pre class="code ruby"><span class='comment'># frozen_string_literal: true
-</span>
-<span class='kw'>module</span> <span class='const'><span class='object_link'><a href="Felflame_.html" title="Felflame (module)">Felflame</a></span></span>
- <span class='const'>VERSION</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>2.0.0</span><span class='tstring_end'>&quot;</span></span>
-<span class='kw'>end</span></pre></div></div>
-
- <div id="footer">
- Generated on Mon Jul 12 04:04:48 2021 by
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.9.26 (ruby-2.7.3).
-</div>
-
- </div>
- </body>
-</html> \ No newline at end of file
diff --git a/docs/index.html b/docs/index.html
index a83a21f..2aeb172 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -550,7 +550,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera. </p>
</div></div>
<div id="footer">
- Generated on Wed Feb 2 03:29:07 2022 by
+ Generated on Thu Feb 3 03:45:34 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 9df50e9..5c85d6f 100644
--- a/docs/method_list.html
+++ b/docs/method_list.html
@@ -230,13 +230,21 @@
<li class="even ">
<div class="item">
+ <span class='object_link'><a href="FelECS/Entities.html#group-class_method" title="FelECS::Entities.group (method)">group</a></span>
+ <small>FelECS::Entities</small>
+ </div>
+ </li>
+
+
+ <li class="odd ">
+ <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 ">
+ <li class="even ">
<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>
@@ -244,7 +252,7 @@
</li>
- <li class="even ">
+ <li class="odd ">
<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>
@@ -252,7 +260,7 @@
</li>
- <li class="odd ">
+ <li class="even ">
<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>
@@ -260,7 +268,7 @@
</li>
- <li class="even ">
+ <li class="odd ">
<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>
@@ -268,7 +276,7 @@
</li>
- <li class="odd ">
+ <li class="even ">
<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>
@@ -276,7 +284,7 @@
</li>
- <li class="even ">
+ <li class="odd ">
<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>
@@ -284,7 +292,7 @@
</li>
- <li class="odd ">
+ <li class="even ">
<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>
@@ -292,7 +300,7 @@
</li>
- <li class="even ">
+ <li class="odd ">
<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>
@@ -300,7 +308,7 @@
</li>
- <li class="odd ">
+ <li class="even ">
<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>
@@ -308,7 +316,7 @@
</li>
- <li class="even ">
+ <li class="odd ">
<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>
@@ -316,7 +324,7 @@
</li>
- <li class="odd ">
+ <li class="even ">
<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>
@@ -324,7 +332,7 @@
</li>
- <li class="even ">
+ <li class="odd ">
<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>
@@ -332,7 +340,7 @@
</li>
- <li class="odd ">
+ <li class="even ">
<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>
@@ -340,7 +348,7 @@
</li>
- <li class="even ">
+ <li class="odd ">
<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>
@@ -348,7 +356,7 @@
</li>
- <li class="odd ">
+ <li class="even ">
<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>
@@ -356,7 +364,7 @@
</li>
- <li class="even ">
+ <li class="odd ">
<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>
@@ -364,7 +372,7 @@
</li>
- <li class="odd ">
+ <li class="even ">
<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>
@@ -372,7 +380,7 @@
</li>
- <li class="even ">
+ <li class="odd ">
<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>
@@ -380,7 +388,7 @@
</li>
- <li class="odd ">
+ <li class="even ">
<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>
@@ -388,7 +396,7 @@
</li>
- <li class="even ">
+ <li class="odd ">
<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>
@@ -396,7 +404,7 @@
</li>
- <li class="odd ">
+ <li class="even ">
<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>
@@ -404,7 +412,7 @@
</li>
- <li class="even ">
+ <li class="odd ">
<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>
diff --git a/docs/top-level-namespace.html b/docs/top-level-namespace.html
index 13472bf..b359611 100644
--- a/docs/top-level-namespace.html
+++ b/docs/top-level-namespace.html
@@ -127,7 +127,7 @@
</div>
<div id="footer">
- Generated on Wed Feb 2 03:29:07 2022 by
+ Generated on Thu Feb 3 03:45:34 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/entity_manager.rb b/lib/felecs/entity_manager.rb
index a457ed2..c1f8cd8 100644
--- a/lib/felecs/entity_manager.rb
+++ b/lib/felecs/entity_manager.rb
@@ -100,6 +100,39 @@ module FelECS
# def to_json() end
class << self
+ # Selects every entity that has components of they type passed into
+ # this function and then executes the code block for those components
+ # and entities.
+ # @return [Nil]
+ def group(*component_managers, &block)
+ return nil if component_managers.empty?
+ if component_managers.length == 1
+ component_managers.first.each do |cmp|
+ block.call(cmp, cmp.entity)
+ end
+ else
+ arry = component_managers.first.select do |cmp|
+ ent = cmp.entity
+ keep = true
+ component_managers.drop(1).each do |mgr|
+ next unless ent.components[mgr].nil?
+ keep = false
+ break
+ end
+ keep
+ end
+ arry.each do |cmp|
+ ent = cmp.entity
+ cmp_arry = [cmp]
+ component_managers.drop(1).each do |cmp_mgr|
+ cmp_arry.push ent.component[cmp_mgr]
+ end
+ block.call(*cmp_arry, ent)
+ end
+ end
+ nil
+ end
+
# Makes component managers behave like arrays with additional
# methods for managing the array
# @!visibility private
diff --git a/mrbgem/mrblib/felecs.rb b/mrbgem/mrblib/felecs.rb
index 56726b2..88e9423 100644
--- a/mrbgem/mrblib/felecs.rb
+++ b/mrbgem/mrblib/felecs.rb
@@ -100,6 +100,39 @@ module FelECS
# def to_json() end
class << self
+ # Selects every entity that has components of they type passed into
+ # this function and then executes the code block for those components
+ # and entities.
+ # @return [Nil]
+ def group(*component_managers, &block)
+ return nil if component_managers.empty?
+ if component_managers.length == 1
+ component_managers.first.each do |cmp|
+ block.call(cmp, cmp.entity)
+ end
+ else
+ arry = component_managers.first.select do |cmp|
+ ent = cmp.entity
+ keep = true
+ component_managers.drop(1).each do |mgr|
+ next unless ent.components[mgr].nil?
+ keep = false
+ break
+ end
+ keep
+ end
+ arry.each do |cmp|
+ ent = cmp.entity
+ cmp_arry = [cmp]
+ component_managers.drop(1).each do |cmp_mgr|
+ cmp_arry.push ent.component[cmp_mgr]
+ end
+ block.call(*cmp_arry, ent)
+ end
+ end
+ nil
+ end
+
# Makes component managers behave like arrays with additional
# methods for managing the array
# @!visibility private
diff --git a/spec/entity_manager_spec.rb b/spec/entity_manager_spec.rb
index 25afa45..234c424 100644
--- a/spec/entity_manager_spec.rb
+++ b/spec/entity_manager_spec.rb
@@ -8,6 +8,8 @@ describe 'Entities' do
before :all do
$VERBOSE = nil
@component_manager ||= FelECS::Components.new('TestEntity', :param1, param2: 'def')
+ @component_manager1 ||= FelECS::Components.new('TestEntity1', :param1, param2: 'def')
+ @component_manager2 ||= FelECS::Components.new('TestEntity2', :param1, param2: 'def')
end
before :each do
@@ -25,6 +27,48 @@ describe 'Entities' do
$stderr = @orig_stderr
FelECS::Entities.reverse_each(&:delete)
@component_manager.reverse_each(&:delete)
+ @component_manager1.reverse_each(&:delete)
+ @component_manager2.reverse_each(&:delete)
+ end
+
+ it 'can iterate over component groups' do
+ cmp_1_1 = @component_manager1.new(param1: 1)
+ cmp_1_2 = @component_manager1.new(param1: 1)
+ cmp_1_3 = @component_manager1.new(param1: 1)
+ cmp_remove = @component_manager2.new
+ @ent0.add cmp_1_1, @cmp0, cmp_1_1, @component_manager2.new
+ @ent1.add cmp_1_2, @cmp1, cmp_1_2, cmp_remove
+ @ent2.add cmp_1_3, @component_manager2.new
+ @ent1.remove cmp_remove
+ FelECS::Entities.group(@component_manager1, @component_manager2) do |cmp1, cmp2, ent|
+ cmp1.param1 += 1
+ end
+ cmp_1_1.param1
+ expect(cmp_1_1.param1).to eq(2)
+ expect(cmp_1_2.param1).to eq(1)
+ expect(cmp_1_3.param1).to eq(2)
+ end
+
+ it 'can iterate over a single component in a group' do
+ @ent0.add @cmp0
+ @ent1.add @cmp1
+ @ent2.add @cmp2
+ @cmp0.param1 = @cmp1.param1 = @cmp2.param1 = 1
+ FelECS::Entities.group(@component_manager) do |cmp, ent|
+ cmp.param1 += 1
+ end
+ expect(@cmp0.param1).to eq(2)
+ expect(@cmp1.param1).to eq(2)
+ expect(@cmp2.param1).to eq(2)
+ end
+
+ it 'can iterate over no components in a group' do
+ @cmp0.param1 = 1
+ @ent0.add @cmp0
+ FelECS::Entities.group do
+ @cmp0.param1 = 0
+ end
+ expect(@cmp0.param1).to eq(1)
end
it 'can get a single component' do