API Docs for:
Show:

EntitySystem Class

Module: ArtemiJS

The most raw entity system. It should not typically be used, but you can create your own entity system handling by extending this. It is recommended that you use the other provided entity system implementations

Methods

added

(
  • entity
)

Parameters:

begin

()

Called before processing of entities begins

changed

(
  • entity
)

Parameters:

check

(
  • entity
)

Will check if the entity is of interest to this system.

Parameters:

  • entity Entity

    the entity to check

checkProcessing

() Boolean

Check the system should processing

Returns:

Boolean: true if the system should be processed, false if not

deleted

(
  • entity
)

Parameters:

disabled

(
  • entity
)

Parameters:

enabled

(
  • entity
)

Parameters:

end

()

Called after the processing of entities ends

getActives

() Utils.Bag

Returns:

Utils.Bag: actives

getIndexFor

(
  • entitySystem
)
Number

Parameters:

Returns:

Number: index

initialize

()

Override to implement code that gets executed when systems are initialized.

inserted

(
  • entity
)

Called if the system has received a entity it is interested in, e.g. created or a component was added to it.

Parameters:

  • entity Entity

    the entity that was added to this system

insertToSystem

(
  • entity
)
private

Parameters:

isPassive

() Boolean

Returns:

Boolean:

process

()

Process the entities

processEntities

(
  • entities
)

Any implementing entity system must implement this method and the logic to process the given entities of the system.

Parameters:

  • entities Bag

    athe entities this system contains

removed

(
  • entity
)

Called if a entity was removed from this system, e.g. deleted or had one of it's components removed.

Parameters:

  • entity Entity

    the entity that was removed from this system.

removeFromSystem

(
  • entity
)
private

Parameters:

setPassive

(
  • passive
)

Parameters:

  • passive Boolean

setWorld

(
  • world
)

Parameters:

Properties

actives

Utils.Bag private

allSet

Utils.BitSet private

aspect

Aspect private

dummy

Boolean private

exclusionSet

Utils.BitSet private

INDEX

Number

indices

Array

oneSet

Utils.BitSet private

passive

Boolean private

systemIndex

Number private final

world

World