summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/FelECS.html4
-rw-r--r--docs/FelECS/ComponentManager.html2
-rw-r--r--docs/FelECS/Components.html2
-rw-r--r--docs/FelECS/Entities.html8
-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.html44
-rw-r--r--docs/_index.html2
-rw-r--r--docs/file.README.html35
-rw-r--r--docs/index.html35
-rw-r--r--docs/top-level-namespace.html2
12 files changed, 99 insertions, 41 deletions
diff --git a/docs/FelECS.html b/docs/FelECS.html
index 62efd37..de85749 100644
--- a/docs/FelECS.html
+++ b/docs/FelECS.html
@@ -227,7 +227,7 @@
</div>
</dt>
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>5.0.0</span><span class='tstring_end'>&#39;</span></span></pre></dd>
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>5.0.1</span><span class='tstring_end'>&#39;</span></span></pre></dd>
</dl>
@@ -325,7 +325,7 @@
</div>
<div id="footer">
- Generated on Thu Feb 3 03:45:34 2022 by
+ Generated on Thu Feb 17 07:54:07 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 fb78748..4519111 100644
--- a/docs/FelECS/ComponentManager.html
+++ b/docs/FelECS/ComponentManager.html
@@ -1229,7 +1229,7 @@
</div>
<div id="footer">
- Generated on Thu Feb 3 03:45:35 2022 by
+ Generated on Thu Feb 17 07:54:07 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 e58decc..368a994 100644
--- a/docs/FelECS/Components.html
+++ b/docs/FelECS/Components.html
@@ -327,7 +327,7 @@
</div>
<div id="footer">
- Generated on Thu Feb 3 03:45:34 2022 by
+ Generated on Thu Feb 17 07:54:07 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 6a5045c..e937df1 100644
--- a/docs/FelECS/Entities.html
+++ b/docs/FelECS/Entities.html
@@ -450,13 +450,16 @@
131
132
133
-134</pre>
+134
+135
+136</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>
@@ -467,6 +470,7 @@
<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>
@@ -925,7 +929,7 @@
</div>
<div id="footer">
- Generated on Thu Feb 3 03:45:34 2022 by
+ Generated on Thu Feb 17 07:54:07 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 6dd5c97..aa0db42 100644
--- a/docs/FelECS/Order.html
+++ b/docs/FelECS/Order.html
@@ -241,7 +241,7 @@
</div>
<div id="footer">
- Generated on Thu Feb 3 03:45:34 2022 by
+ Generated on Thu Feb 17 07:54:07 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 d11b129..9e66030 100644
--- a/docs/FelECS/Scenes.html
+++ b/docs/FelECS/Scenes.html
@@ -755,7 +755,7 @@
</div>
<div id="footer">
- Generated on Thu Feb 3 03:45:35 2022 by
+ Generated on Thu Feb 17 07:54:07 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 02b1f70..0ae8a35 100644
--- a/docs/FelECS/Stage.html
+++ b/docs/FelECS/Stage.html
@@ -562,7 +562,7 @@
</div>
<div id="footer">
- Generated on Thu Feb 3 03:45:34 2022 by
+ Generated on Thu Feb 17 07:54:07 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 f4ef7ac..18e1442 100644
--- a/docs/FelECS/Systems.html
+++ b/docs/FelECS/Systems.html
@@ -1118,28 +1118,28 @@
<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><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'>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'>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>
@@ -1150,8 +1150,8 @@
<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><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>
@@ -1495,7 +1495,7 @@
</div>
<div id="footer">
- Generated on Thu Feb 3 03:45:35 2022 by
+ Generated on Thu Feb 17 07:54:07 2022 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.26 (ruby-2.7.3).
</div>
diff --git a/docs/_index.html b/docs/_index.html
index 8e128ed..8b6dad0 100644
--- a/docs/_index.html
+++ b/docs/_index.html
@@ -178,7 +178,7 @@
</div>
<div id="footer">
- Generated on Thu Feb 3 03:45:34 2022 by
+ Generated on Thu Feb 17 07:54:07 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 6da1a7c..4218261 100644
--- a/docs/file.README.html
+++ b/docs/file.README.html
@@ -63,11 +63,11 @@
<p><a href="https://codeclimate.com/github/realtradam/FelFlame/maintainability"><img src="https://api.codeclimate.com/v1/badges/56d425d9078e98efb74b/maintainability" alt="Maintainability"></a>
<a href="https://codeclimate.com/github/realtradam/FelFlame/test_coverage"><img src="https://api.codeclimate.com/v1/badges/56d425d9078e98efb74b/test_coverage" alt="Test Coverage"></a>
-<a href="http://inch-ci.org/github/realtradam/FelECS"><img src="http://inch-ci.org/github/realtradam/FelECS.svg?branch=master" alt="Inline docs"></a>
<a href="https://github.com/realtradam/FelFlame/blob/master/LICENSE"><img src="https://img.shields.io/github/license/realtradam/FelECS" alt="MIT License"></a>
-<a href="https://ko-fi.com/tradam"><img src="https://img.shields.io/static/v1?message=Buy%20me%20a%20coffee&logo=kofi&labelColor=ff5e5b&color=434B57&logoColor=white&label=%20" alt="Ko-Fi"></a></p>
+<a href="https://ko-fi.com/tradam"><img src="https://img.shields.io/static/v1?message=Buy%20me%20a%20coffee&logo=kofi&labelColor=ff5e5b&color=434B57&logoColor=white&label=%20" alt="Ko-Fi"></a>
+&lt;!--<a href="http://inch-ci.org/github/realtradam/FelECS"><img src="http://inch-ci.org/github/realtradam/FelECS.svg?branch=master" alt="Inline docs"></a>--&gt; &lt;!-- this is busted --&gt;</p>
-<p><strong><a href="https://felflame.tradam.fyi/">Check out the comprehensive documentation here!</a></strong></p>
+<p><strong><a href="https://felecs.tradam.dev">Check out the comprehensive documentation here!</a></strong></p>
<hr>
@@ -92,6 +92,7 @@
<li><a href="#accessing">Accessing</a></li>
<li><a href="#adding-and-removing-components">Adding and Removing Components</a></li>
<li><a href="#accessing-entities-attached-components">Accessing Entities&#39; Attached Components</a></li>
+<li><a href="#iterating-over-grouped-entities">Iterating Over Grouped Entities</a></li>
<li><a href="#deletion">Deletion</a></li>
</ul></li>
<li><a href="#components-1">Components</a>
@@ -246,6 +247,32 @@ If you need to you can access Entities using the <code>Entities</code> module:</
<pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span><span class='period'>.</span><span class='id identifier rubyid_components'>components</span><span class='lbracket'>[</span><span class='ivar'>@component_manager</span><span class='rbracket'>]</span> <span class='comment'># =&gt; [@component1, @component2, @component3]
</span></code></pre>
+<h3 id="iterating-over-grouped-entities">Iterating Over Grouped Entities</h3>
+
+<p>You can execute a block for each entity that has all matching component types attached to it like so:</p>
+
+<pre class="code ruby"><code class="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
+</code></pre>
+
+<p>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.<br>
+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.</p>
+
<h3 id="deletion">Deletion</h3>
<p>To have all Components from an Entity <strong>removed</strong> and the Entity deleted we do the following:</p>
@@ -550,7 +577,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera. </p>
</div></div>
<div id="footer">
- Generated on Thu Feb 3 03:45:34 2022 by
+ Generated on Thu Feb 17 07:54:07 2022 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.26 (ruby-2.7.3).
</div>
diff --git a/docs/index.html b/docs/index.html
index 2aeb172..f53468d 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -63,11 +63,11 @@
<p><a href="https://codeclimate.com/github/realtradam/FelFlame/maintainability"><img src="https://api.codeclimate.com/v1/badges/56d425d9078e98efb74b/maintainability" alt="Maintainability"></a>
<a href="https://codeclimate.com/github/realtradam/FelFlame/test_coverage"><img src="https://api.codeclimate.com/v1/badges/56d425d9078e98efb74b/test_coverage" alt="Test Coverage"></a>
-<a href="http://inch-ci.org/github/realtradam/FelECS"><img src="http://inch-ci.org/github/realtradam/FelECS.svg?branch=master" alt="Inline docs"></a>
<a href="https://github.com/realtradam/FelFlame/blob/master/LICENSE"><img src="https://img.shields.io/github/license/realtradam/FelECS" alt="MIT License"></a>
-<a href="https://ko-fi.com/tradam"><img src="https://img.shields.io/static/v1?message=Buy%20me%20a%20coffee&logo=kofi&labelColor=ff5e5b&color=434B57&logoColor=white&label=%20" alt="Ko-Fi"></a></p>
+<a href="https://ko-fi.com/tradam"><img src="https://img.shields.io/static/v1?message=Buy%20me%20a%20coffee&logo=kofi&labelColor=ff5e5b&color=434B57&logoColor=white&label=%20" alt="Ko-Fi"></a>
+&lt;!--<a href="http://inch-ci.org/github/realtradam/FelECS"><img src="http://inch-ci.org/github/realtradam/FelECS.svg?branch=master" alt="Inline docs"></a>--&gt; &lt;!-- this is busted --&gt;</p>
-<p><strong><a href="https://felflame.tradam.fyi/">Check out the comprehensive documentation here!</a></strong></p>
+<p><strong><a href="https://felecs.tradam.dev">Check out the comprehensive documentation here!</a></strong></p>
<hr>
@@ -92,6 +92,7 @@
<li><a href="#accessing">Accessing</a></li>
<li><a href="#adding-and-removing-components">Adding and Removing Components</a></li>
<li><a href="#accessing-entities-attached-components">Accessing Entities&#39; Attached Components</a></li>
+<li><a href="#iterating-over-grouped-entities">Iterating Over Grouped Entities</a></li>
<li><a href="#deletion">Deletion</a></li>
</ul></li>
<li><a href="#components-1">Components</a>
@@ -246,6 +247,32 @@ If you need to you can access Entities using the <code>Entities</code> module:</
<pre class="code ruby"><code class="ruby"><span class='ivar'>@entity</span><span class='period'>.</span><span class='id identifier rubyid_components'>components</span><span class='lbracket'>[</span><span class='ivar'>@component_manager</span><span class='rbracket'>]</span> <span class='comment'># =&gt; [@component1, @component2, @component3]
</span></code></pre>
+<h3 id="iterating-over-grouped-entities">Iterating Over Grouped Entities</h3>
+
+<p>You can execute a block for each entity that has all matching component types attached to it like so:</p>
+
+<pre class="code ruby"><code class="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
+</code></pre>
+
+<p>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.<br>
+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.</p>
+
<h3 id="deletion">Deletion</h3>
<p>To have all Components from an Entity <strong>removed</strong> and the Entity deleted we do the following:</p>
@@ -550,7 +577,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera. </p>
</div></div>
<div id="footer">
- Generated on Thu Feb 3 03:45:34 2022 by
+ Generated on Thu Feb 17 07:54:07 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/top-level-namespace.html b/docs/top-level-namespace.html
index b359611..3515d3c 100644
--- a/docs/top-level-namespace.html
+++ b/docs/top-level-namespace.html
@@ -127,7 +127,7 @@
</div>
<div id="footer">
- Generated on Thu Feb 3 03:45:34 2022 by
+ Generated on Thu Feb 17 07:54:07 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>