diff --git a/GameObjectManager.cpp b/GameObjectManager.cpp index 5aa4ed1..3d20f64 100644 --- a/GameObjectManager.cpp +++ b/GameObjectManager.cpp @@ -342,13 +342,6 @@ void GameObjectManager::handleEvent(const SDL_Event& event) { objects_in_inventory--; } } - else if (bearName.length() >= 3 && !(bearName.compare("TOM") == 0)) { - bearName = ""; - for (const auto& cube : selectedCubes) { - gInventoryMap[cube.name] = cube; - } - selectedCubes.clear(); - } } else if (current_room_index==1) { if (InventoryItem* item = GetItemSelected(true)){ @@ -389,7 +382,7 @@ void GameObjectManager::handleEvent(const SDL_Event& event) { } else if (current_room_index==2) { if (InventoryItem* item = GetItemSelected(true)){ - + if (item->name == "lockFriend"){} } } } @@ -401,7 +394,7 @@ void GameObjectManager::handleEvent(const SDL_Event& event) { continue; } - if (ao->name != "lampe") { + if (ao->name != "lampe" && ao->name != "doorGlory" && ao->name != "lockFriend" ) { AddItemToInventory(ao->name, ao->inventoryIconTexturePtr, objects_in_inventory+1); objects_in_inventory++; @@ -409,6 +402,20 @@ void GameObjectManager::handleEvent(const SDL_Event& event) { rooms[current_room_index].removeByPtr(ao); activeObjects = rooms[current_room_index].objects; } + else if (ao->name != "doorGlory"){ + hasMadeChoise = true; + hasChoisedFriendship = false; + +// debug switching + switch_room(0); + } + else if (ao->name != "lockFriend"){ + hasMadeChoise = true; + hasChoisedFriendship = true; + + // debug switching + switch_room(0); + } //aoMgr.removeByName(ao->name); diff --git a/GameObjectManager.h b/GameObjectManager.h index f88b869..4e58c5a 100644 --- a/GameObjectManager.h +++ b/GameObjectManager.h @@ -103,6 +103,9 @@ public: std::shared_ptr batteryDialogTexturePtr; // Активная текстура диалога bool isBatteryDialogActive = false; // Флаг активности диалога + bool hasChoisedFriendship = false; + bool hasMadeChoise = false; + private: //int animationCounter = 0; int lastMouseX = 0; // Добавляем переменные для хранения позиции мыши