-
Notifications
You must be signed in to change notification settings - Fork 2
Store
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.
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 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.