This commit is contained in:
Альберт Гадиев 2025-03-02 22:09:25 +06:00
parent 0aff255379
commit 5c571578dd
3 changed files with 5 additions and 3 deletions

View File

@ -80,6 +80,7 @@ public:
bool checkCollision(const Vector3f& position) const { bool checkCollision(const Vector3f& position) const {
// Проверяем границы комнаты // Проверяем границы комнаты
std::cout << "checkCollision" << std::endl;
if (roomBoundary && !roomBoundary->isInside(position)) { if (roomBoundary && !roomBoundary->isInside(position)) {
return true; return true;
} }

View File

@ -370,7 +370,7 @@ void GameObjectManager::handleEvent(const SDL_Event& event) {
Environment::cameraAlpha = 0.9 * M_PI / 2.0; Environment::cameraAlpha = 0.9 * M_PI / 2.0;
} }
} }
else { else {checkCollision
lastMouseX = event.motion.x; lastMouseX = event.motion.x;
lastMouseY = event.motion.y; lastMouseY = event.motion.y;
} }

View File

@ -4,6 +4,7 @@
#include "AudioPlayerAsync.h" #include "AudioPlayerAsync.h"
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <list> // Добавляем include для std::list
#include "ActiveObject.h" #include "ActiveObject.h"
#include "Room.h" #include "Room.h"
#include "BoundaryBox.h" // Добавляем включение #include "BoundaryBox.h" // Добавляем включение
@ -45,8 +46,8 @@ public:
ZL::VertexDataStruct textMesh; ZL::VertexDataStruct textMesh;
ZL::VertexRenderStruct textMeshMutable; ZL::VertexRenderStruct textMeshMutable;
//ZL::VertexDataStruct coneMesh; ZL::VertexDataStruct coneMesh; // Раскомментировали
//ZL::VertexRenderStruct coneMeshMutable; ZL::VertexRenderStruct coneMeshMutable; // Раскомментировали
std::vector<ZL::ActiveObject> activeObjects; std::vector<ZL::ActiveObject> activeObjects;
std::vector<ZL::Room> rooms; std::vector<ZL::Room> rooms;