Minor fixing
This commit is contained in:
1 parent
4af20c65e6
commit
41f370f2ee
4 files changed
+86
-9
No files matched your search
@@ -12,6 +12,8 @@ namespace ZL {
|
||||
MainMenu,
|
||||
ShipSelectionSingle,
|
||||
ShipSelectionMulti,
|
||||
Connecting,
|
||||
ConnectionFailed,
|
||||
Gameplay,
|
||||
GameOver,
|
||||
ConnectionLost
|
||||
@@ -24,16 +26,24 @@ namespace ZL {
|
||||
// Pre-loaded UI roots (loaded once in setupMenu)
|
||||
std::shared_ptr<UiNode> mainMenuRoot;
|
||||
std::shared_ptr<UiNode> shipSelectionRoot;
|
||||
std::shared_ptr<UiNode> connectingRoot;
|
||||
std::shared_ptr<UiNode> connectionFailedRoot;
|
||||
std::shared_ptr<UiNode> gameplayRoot;
|
||||
std::shared_ptr<UiNode> gameOverRoot;
|
||||
std::shared_ptr<UiNode> connectionLostRoot;
|
||||
|
||||
// Stored for multiplayer retry
|
||||
std::string pendingMultiNick;
|
||||
int pendingMultiShipType = 0;
|
||||
|
||||
GameState state = GameState::MainMenu;
|
||||
|
||||
// State transition methods
|
||||
void enterMainMenu();
|
||||
void enterShipSelectionSingle();
|
||||
void enterShipSelectionMulti();
|
||||
void enterConnecting();
|
||||
void enterConnectionFailed();
|
||||
void enterGameplay();
|
||||
void enterGameOver(int score);
|
||||
void enterConnectionLost();
|
||||
@@ -52,6 +62,8 @@ namespace ZL {
|
||||
// Called by game events
|
||||
void showGameOver(int score);
|
||||
void showConnectionLost();
|
||||
void notifyConnected();
|
||||
void notifyConnectionFailed();
|
||||
|
||||
// Callbacks set by Game/Space
|
||||
std::function<void()> onRestartPressed;
|
||||
|
||||
Reference in new issue
Block a user