Controlling System Execution
When writing a game you'll eventually reach a point where you want to have more control over when certain System
s are executed, such as running them for specific State
s or pausing them when a certain condition is met. Right now you have these three options to achieve said control:
-
Custom GameData:
Store multiple
Dispatcher
s in a customGameData
. EachDispatcher
has its own assignedSystem
s andState
s determines whichDispatcher
s to run. -
State-specific Dispatcher:
A
State
contains its ownDispatcher
with its ownSystem
s and theState
handles the execution. -
Pausable Systems:
When registering a
System
with aDispatcher
, specify the value of aResource
R
. TheSystem
runs only if theResource
equals that value. This allows for more selective enabling and disabling ofSystem
s.
This section contains guides that demonstrate each of these methods.