Controlling System Execution

When writing a game you'll eventually reach a point where you want to have more control over when certain Systems are executed, such as running them for specific States or pausing them when a certain condition is met. Right now you have these three options to achieve said control:

  • Custom GameData:

    Store multiple Dispatchers in a custom GameData. Each Dispatcher has its own assigned Systems and States determines which Dispatchers to run.

  • State-specific Dispatcher:

    A State contains its own Dispatcher with its own Systems and the State handles the execution.

  • Pausable Systems:

    When registering a System with a Dispatcher, specify the value of a Resource R. The System runs only if the Resource equals that value. This allows for more selective enabling and disabling of Systems.

This section contains guides that demonstrate each of these methods.