Module system

System A System iterates over Entities.

From these Entities its get Components and modify them. A System contains 1 or more Pools. A System is contained by 1 World.

Functions

System.new (...) Creates a new SystemClass.
System.__buildPool (baseFilter) Internal: Builds a Pool for the System.
System:__evaluate (e) Internal: Evaluates an Entity for all the System's Pools.
System:__remove (e) Internal: Removes an Entity from the System.
System:clear () Internal: Clears all Entities from the System.
System:enable () Enables the System.
System:disable () Disables the System.
System:toggleEnable () Toggles if the System is enabled.
System:setEnabled (enable) Sets if the System is enabled
System:isEnabled () Returns is the System is enabled
System:getWorld () Returns the World the System is in.
System:init (world) Callback for system initialization.


Functions

System.new (...)
Creates a new SystemClass.

Parameters:

  • ... Variable amounts of filters

Returns:

    A new SystemClass
System.__buildPool (baseFilter)
Internal: Builds a Pool for the System.

Parameters:

  • baseFilter The 'raw' Filter

Returns:

    A new Pool
System:__evaluate (e)
Internal: Evaluates an Entity for all the System's Pools.

Parameters:

  • e The Entity to check

Returns:

    self
System:__remove (e)
Internal: Removes an Entity from the System.

Parameters:

  • e The Entity to remove

Returns:

    self
System:clear ()
Internal: Clears all Entities from the System.

Returns:

    self
System:enable ()
Enables the System.

Returns:

    self
System:disable ()
Disables the System.

Returns:

    self
System:toggleEnable ()
Toggles if the System is enabled.

Returns:

    self
System:setEnabled (enable)
Sets if the System is enabled

Parameters:

  • enable Enable

Returns:

    self
System:isEnabled ()
Returns is the System is enabled

Returns:

    True if the System is enabled, false otherwise
System:getWorld ()
Returns the World the System is in.

Returns:

    The World the System is in
System:init (world)
Callback for system initialization.

Parameters:

  • world The World the System was added to
generated by LDoc 1.4.6 Last updated 2020-01-04 00:43:06