abstract class Crash::Family
- Crash::Family
- Reference
- Object
Overview
The interface for classes that are used to manage NodeLists (set as the familyClass property in the Engine object). Most developers don't need to use this since the default implementation is used by default and suits most needs.
Direct Known Subclasses
Defined in:
crash/family.crInstance Method Summary
-
#clean_up
The family is about to be discarded.
-
#component_added_to_entity(entity : Crash::Entity, component_class : Crash::Component.class)
A component has been added to an entity.
-
#component_removed_from_entity(entity : Crash::Entity, component_class : Crash::Component.class)
A component has been removed from an entity.
-
#entity_list : Array(Crash::Entity)
Returns the NodeList managed by this class.
-
#new_entity(entity : Crash::Entity)
An entity has been added to the engine.
-
#remove_entity(entity : Crash::Entity)
An entity has been removed from the engine.
Instance Method Detail
The family is about to be discarded. Clean up all properties as necessary. Usually, you will want to empty the NodeList at this time.
A component has been added to an entity. Test whether the entity's inclusion in this family's NodeList should be modified.
A component has been removed from an entity. Test whether the entity's inclusion in this family's NodeList should be modified.
Returns the NodeList managed by this class. This should be a reference that remains valid always since it is retained and reused by Systems that use the list. i.e. never recreate the list, always modify it in place.
An entity has been added to the engine. It may already have components so test the entity for inclusion in this family's NodeList.
An entity has been removed from the engine. If it's in this family's NodeList it should be removed.