From 22ad0ebf98601e6eb8b26df4ba7af805f7317499 Mon Sep 17 00:00:00 2001 From: maka70vv <25.makarovv@gmail.com> Date: Sun, 2 Mar 2025 01:01:10 +0600 Subject: [PATCH] tested room switching --- GameObjectManager.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/GameObjectManager.cpp b/GameObjectManager.cpp index 38c7c95..be3e023 100644 --- a/GameObjectManager.cpp +++ b/GameObjectManager.cpp @@ -112,16 +112,19 @@ void GameObjectManager::initialize() { void GameObjectManager::handleEvent(const SDL_Event& event) { - if (event.type == SDL_MOUSEBUTTONDOWN) { +// debug room switching + if (event.type == SDL_MOUSEBUTTONDOWN && event.button.button == SDL_BUTTON_RIGHT) { + + current_room_index = 1; + std::cout << "Current room" << current_room_index << std::endl; + + + } + else if (event.type == SDL_MOUSEBUTTONDOWN) { bx.Interpolate(animationCounter); animationCounter += 2; } - else if (event.type == SDL_MOUSEBUTTONDOWN && event.button.button == SDL_BUTTON_RIGHT) { - //switchRoom(); - - - } else if (event.type == SDL_MOUSEWHEEL) { static const float zoomstep = 1.0f; if (event.wheel.y > 0) {