From a556b45abf18f1bd509daaf63b66b7d55e9fd291 Mon Sep 17 00:00:00 2001 From: jjesswan Date: Mon, 22 Apr 2024 21:56:26 -0400 Subject: add engine version --- .../Game/Systems/Pathfinding/aimovementsystem.cpp | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 engine-ocean/Game/Systems/Pathfinding/aimovementsystem.cpp (limited to 'engine-ocean/Game/Systems/Pathfinding/aimovementsystem.cpp') diff --git a/engine-ocean/Game/Systems/Pathfinding/aimovementsystem.cpp b/engine-ocean/Game/Systems/Pathfinding/aimovementsystem.cpp new file mode 100644 index 0000000..8abbec8 --- /dev/null +++ b/engine-ocean/Game/Systems/Pathfinding/aimovementsystem.cpp @@ -0,0 +1,35 @@ +#include "aimovementsystem.h" +#include "Game/Components/TransformComponent.h" +#include "Game/Components/PathfindComponent.h" +#include "Game/Systems/AI/aibehaviorcomponent.h" + +AIMovementSystem::AIMovementSystem(std::map>& dynamic_gameobjects, + std::map>& rigid_gameobjects) : + m_dynamic_gameobjects(dynamic_gameobjects), + m_rigid_gameobjects(rigid_gameobjects) + +{ + // m_path = m_rigid_gameobjects.at("navmesh")->getComponent()->getPath(glm::vec3(-0.58249, 0, -0.0210782), glm::vec3(19.5371, 0, 1.39167)); + +} + +TransformComponent* AIMovementSystem::getTransform(std::shared_ptr &go){ + return go->getComponent(); +} + + +void AIMovementSystem::update(double deltaTime){ + for (auto &go : m_dynamic_gameobjects){ + if (go.second->hasComponent()){ + go.second->getComponent()->update(deltaTime); + } + } +} + + + + +void AIMovementSystem::draw(){} +void AIMovementSystem::scrollEvent(double distance){} +void AIMovementSystem::mousePosEvent(double xpos, double ypos){} + -- cgit v1.2.3-70-g09d2