Skip to content
ConcordConcordConcord

System

Iterates over Entities. From these Entities it gets Components and modifies them.

If the concord folder is in the root directory of your game, you can import this module like so:

System = require('concord.system')

Creates a new SystemClass.

system = System.new( name, definition )
Name Type Description
name string Name of the System. If the first argument is not a string, it is treated as the definition.
definition table<string, FilterDefinition> A table containing filters (name = {components…})
Name Type Description
system SystemClass

system = System.new( definition )
Name Type Description
definition table<string FilterDefinition> A table containing filters (name = {components…})
Name Type Description
system SystemClass

Sets whether the System is enabled.

system = system:setEnabled( enable )
Name Type Description
enable boolean
Name Type Description
system System

Returns whether the System is enabled.

boolean = system:isEnabled()
Name Type Description
boolean boolean

Returns the World the System is in.

world = system:getWorld()
Name Type Description
world World

Callback for system initialization.

system:init( world )
Name Type Description
world World The World the System was added to

Callback for when a System is enabled.

system:onEnabled()

Callback for when a System is disabled.

system:onDisabled()