Class ComponentMatchingFamily<TNode>

The default class for managing a NodeList. This class creates the NodeList and adds and removes nodes to/from the list as the entities and the components in the engine change.

It uses the basic entity matching pattern of an entity system - entities are added to the list if they contain components matching all the public properties of the node class.

Type Parameters

Hierarchy

  • ComponentMatchingFamily

Implements

Constructors

Properties

components: Map<Class<any>, string>

Accessors

  • get nodeList(): NodeList<TNode>
  • The nodelist managed by this family. This is a reference that remains valid always since it is retained and reused by Systems that use the list. i.e. we never recreate the list, we always modify it in place.

    Returns NodeList<TNode>

Methods

  • Called by the engine when a component has been removed from an entity. We check if the removed component is required by this family's NodeList and if so, we check if the entity is in this this NodeList and remove it if so.

    Parameters

    Returns void

Generated using TypeDoc