fixed freezing in second scene

This commit is contained in:
maka70vv committed 2025-03-02 18:42:31 +06:00
1 parent cfc96f645e
commit 383b34f5d6
3 files changed
+11 -1

No files matched your search

+1 -1
View File
@@ -92,7 +92,7 @@ void GameObjectManager::initialize() {
Room room_2; Room room_2;
room_2.roomTexture = std::make_shared<Texture>(CreateTextureDataFromBmp24("./background.bmp")); room_2.roomTexture = std::make_shared<Texture>(CreateTextureDataFromBmp24("./background.bmp"));
room_2.sound_name = "Symphony No.6 (1st movement).ogg"; room_2.sound_name = "Symphony No.6 (1st movement).ogg";
room_2.roomLogic = createRoom1Logic(); room_2.roomLogic = createRoom2Logic();
rooms.push_back(room_2); rooms.push_back(room_2);
activeObjects = rooms[current_room_index].objects; activeObjects = rooms[current_room_index].objects;
+9
View File
@@ -19,4 +19,13 @@ namespace ZL
}; };
} }
std::function<void(GameObjectManager&, size_t)> createRoom2Logic()
{
return [](GameObjectManager& gom, size_t ms)
// Simple test logic
{
};
}
} }
+1
View File
@@ -5,5 +5,6 @@ namespace ZL {
class GameObjectManager; class GameObjectManager;
std::function<void(GameObjectManager&, size_t)> createRoom1Logic(); std::function<void(GameObjectManager&, size_t)> createRoom1Logic();
std::function<void(GameObjectManager&, size_t)> createRoom2Logic();
} }