From fcd25e47987a8fd35a1712201dcc035707fd462c Mon Sep 17 00:00:00 2001 From: realtradam Date: Thu, 17 Feb 2022 07:55:00 -0500 Subject: fix code climate and remove deprecated files --- docs/index.html | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'docs/index.html') 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 @@

Maintainability Test Coverage -Inline docs MIT License -Ko-Fi

+Ko-Fi +<!--Inline docs--> <!-- this is busted -->

-

Check out the comprehensive documentation here!

+

Check out the comprehensive documentation here!


@@ -92,6 +92,7 @@
  • Accessing
  • Adding and Removing Components
  • Accessing Entities' Attached Components
  • +
  • Iterating Over Grouped Entities
  • Deletion
  • Components @@ -246,6 +247,32 @@ If you need to you can access Entities using the Entities module:@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:

    + +
    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:

    @@ -550,7 +577,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera.

    -- cgit v1.2.3