You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ChickenStorm edited this page Sep 19, 2020
·
2 revisions
The store is an autoloaded module which contains the game state. It centralizes the global data and allows game components to access it, or write it in a way that will notify related components.
Game State
The game state contains API data, like systems, fleets, current player, but also shared data used by multiple components. For example, when you select a system on the map, several components must be aware of that, like the map (for highlighting), a details panel, whatever else.
The class definitions can be found in res://resources/definitions/Store/
Each elements of the game state is responsible to dispatch its own signals.
SelectedState
SelectedState is a class that manage the sate of selected system and fleet. It manage by itself to connect and disconnect the signals of system and fleet when the select fleet and system changed.