Interface: System

System

Interface of sub-systems of game.

Source:

Members


<readonly> game :Game

Reference to the owner game instance

Type:
Source:

<readonly> name :String

Name of this system

Type:
  • String
Source:

Methods


awake(settings)

Callback that will be invoked when owner game is awake.

Parameters:
Name Type Description
settings Object

Settings passed to the game

Source:

fixedUpdate(dt, dtSec)

Callback that will be invoked each fixed frame(based on Game#desiredFPS).

Parameters:
Name Type Description
dt Number

Delta time in millisecond

dtSec Number

Delta time in second

Source:

freeze()

Callback that will be invoked when owner game is freeze.

Source:

onEntityRemove(ent)

Callback that will be invoked on each entity remove.

Parameters:
Name Type Description
ent Entity

Entity instance

Source:

onEntitySpawn(ent)

Callback that will be invoked on each entity spawn.

Parameters:
Name Type Description
ent Entity

Entity instance

Source:

onEntityTagChange(ent, tag)

Callback that will be invoked when an entity changes its tag.

Parameters:
Name Type Description
ent Entity

Entity instance

tag String

New tag

Source:

onPause()

Callback that will be invoked when owner game will pause.

Source:

onResume()

Callback that will be invoked when owner game will resume from pause.

Source:

update(dt, dtSec)

Callback that will be invoked each idle frame(animation frame).

Parameters:
Name Type Description
dt Number

Delta time in millisecond

dtSec Number

Delta time in second

Source: