mirror of
https://github.com/zhenyan121/SporeBG-Conid.git
synced 2026-04-10 06:14:08 +08:00
refactor: enhance type safety by changing SceneType from string to enum class
This commit is contained in:
@@ -11,9 +11,9 @@ GameScene::~GameScene() {
|
||||
std::unique_ptr<GameUIManager> GameScene::createUIManager() {
|
||||
// 默认创建普通的GameUIManager
|
||||
return std::make_unique<GameUIManager>(
|
||||
[this](const std::string& sceneName) {
|
||||
[this](SceneType sceneType) {
|
||||
if (m_eventCallback) {
|
||||
SceneEvent event{SceneEventType::ChangeScene, sceneName};
|
||||
SceneEvent event{SceneEventType::ChangeScene, sceneType};
|
||||
m_eventCallback(event);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user