Adds a new game state.
the state unique key name.
the type of the this state value.
the initial value of the state.
if true, will use engine storage instead of default storage.
Adds a callback to a state. It will be called when the value of this state change.
the state unique key name.
the callback function.
the call type of this callback. Can be "once" or "multiple".
returns the binding id.
Gets the value of a state.
the state unique key name.
returns the state value.
Gets the storage object of a state.
the state unique key name.
returns the storage object
Initializes the storage system.
Removes a state from the internal storage.
the state unique key name.
Removes a callback from a state.
the state unique key name.
the callback id.
Sets a value of a state;
the state unique key name.
the new state value to be set.
if true, will use engine storage instead of default storage.
Generated using TypeDoc
The game storage system. This class holds the game custom states. States can hold values of boolean, number, string and position (x and y) types. When setting a state value, callbacks can be called in the there are some them associated. There's also in this class an engine storage for internal states management. User can't control this last one.