API Docs for:
Show:

ComponentManager Class

Object to manage components

Methods

addComponent

(
  • entity
  • type
  • component
)

Add component by type

Parameters:

clean

()

Clean deleted componenets of entities

deleted

(
  • entity
)

Add entity to delete componenets of them

Parameters:

getComponent

(
  • entity
  • type
)

Get component

Parameters:

Returns:

Mixed Component on success, null on false

getComponentsByType

(
  • type
)
Utils.Bag

Get component by type

Parameters:

Returns:

Utils.Bag: Bag of components

getComponentsFor

(
  • entity
  • Bag
)
Utils.Bag

Get component for

Parameters:

Returns:

Utils.Bag: Bag of components

initialize

()

removeComponent

(
  • entity
  • type
)

Remove component by type

Parameters:

removeComponentsOfEntity

(
  • entity
)
private

Parameters:

Properties

componentsByType

Utils.Bag private

deleted

Utils.Bag private