Added help and about, minor improvements
This commit is contained in:
1 parent
18674efd8e
commit
e5296a41b9
32 files changed
+1855
-54
No files matched your search
@@ -10,12 +10,14 @@ namespace ZL {
|
||||
|
||||
enum class GameState {
|
||||
MainMenu,
|
||||
AboutMenu,
|
||||
ShipSelectionSingle,
|
||||
ShipSelectionMulti,
|
||||
Connecting,
|
||||
ConnectionFailed,
|
||||
Gameplay,
|
||||
GameOver,
|
||||
HelpScreen,
|
||||
ConnectionLost
|
||||
};
|
||||
|
||||
@@ -25,11 +27,13 @@ namespace ZL {
|
||||
|
||||
// Pre-loaded UI roots (loaded once in setupMenu)
|
||||
std::shared_ptr<UiNode> mainMenuRoot;
|
||||
std::shared_ptr<UiNode> aboutMenuRoot;
|
||||
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> helpScreenRoot;
|
||||
std::shared_ptr<UiNode> connectionLostRoot;
|
||||
|
||||
// Stored for multiplayer retry
|
||||
@@ -40,12 +44,14 @@ namespace ZL {
|
||||
|
||||
// State transition methods
|
||||
void enterMainMenu();
|
||||
void enterAboutMenu();
|
||||
void enterShipSelectionSingle();
|
||||
void enterShipSelectionMulti();
|
||||
void enterConnecting();
|
||||
void enterConnectionFailed();
|
||||
void enterGameplay();
|
||||
void enterGameOver(int score);
|
||||
void enterHelp();
|
||||
void enterConnectionLost();
|
||||
|
||||
public:
|
||||
@@ -74,6 +80,8 @@ namespace ZL {
|
||||
std::function<void(const std::string&, int)> onSingleplayerPressed;
|
||||
std::function<void(const std::string&, int)> onMultiplayerPressed;
|
||||
std::function<void()> onShowPlayersPressed;
|
||||
|
||||
std::function<void()> forceSetupSpaceUICallback;
|
||||
};
|
||||
|
||||
} // namespace ZL
|
||||
Reference in new issue
Block a user