mirror of
https://github.com/zhenyan121/SporeBG-Conid.git
synced 2026-04-10 06:14:08 +08:00
Added GameOver Scene
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include "ui/base/IUIManager.h"
|
||||
#include "game/GameTypes.h"
|
||||
#include <functional>
|
||||
class GameUIManager : public IUIManager {
|
||||
public:
|
||||
GameUIManager(SDL_Renderer* renderer, TextRenderer* textRenderer);
|
||||
@@ -9,6 +10,8 @@ public:
|
||||
|
||||
void init();
|
||||
|
||||
void setCallback(std::function<void()> restartCallback);
|
||||
|
||||
const UIRenderData& getUIRenderData();
|
||||
// 收集渲染数据
|
||||
void CollectRenderData();
|
||||
@@ -16,7 +19,14 @@ public:
|
||||
void UpdateMousePositon(float x, float y);
|
||||
|
||||
void updateActionType(ActionType type);
|
||||
private:
|
||||
|
||||
|
||||
};
|
||||
void updateGameState(GameState state);
|
||||
|
||||
bool handleClick(float x, float y);
|
||||
private:
|
||||
std::function<void()> m_restartCallback;
|
||||
void setupUIComponents();
|
||||
|
||||
GameState m_currentGameState = GameState::GAME_RUNING;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user