summaryrefslogtreecommitdiff
path: root/engine-ocean/Game/Systems/Pathfinding/aimovementsystem.cpp
diff options
context:
space:
mode:
authorjjesswan <jessica_wan@brown.edu>2024-04-22 21:56:26 -0400
committerjjesswan <jessica_wan@brown.edu>2024-04-22 21:56:26 -0400
commita556b45abf18f1bd509daaf63b66b7d55e9fd291 (patch)
treebc9b8a2d184c12aee236e7f9f276a34b84ca552d /engine-ocean/Game/Systems/Pathfinding/aimovementsystem.cpp
parentcd7c76017a12bb548036571c1ff13e551369d06d (diff)
add engine version
Diffstat (limited to 'engine-ocean/Game/Systems/Pathfinding/aimovementsystem.cpp')
-rw-r--r--engine-ocean/Game/Systems/Pathfinding/aimovementsystem.cpp35
1 files changed, 35 insertions, 0 deletions
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<std::string, std::shared_ptr<GameObject>>& dynamic_gameobjects,
+ std::map<std::string, std::shared_ptr<GameObject>>& rigid_gameobjects) :
+ m_dynamic_gameobjects(dynamic_gameobjects),
+ m_rigid_gameobjects(rigid_gameobjects)
+
+{
+ // m_path = m_rigid_gameobjects.at("navmesh")->getComponent<PathfindComponent>()->getPath(glm::vec3(-0.58249, 0, -0.0210782), glm::vec3(19.5371, 0, 1.39167));
+
+}
+
+TransformComponent* AIMovementSystem::getTransform(std::shared_ptr<GameObject> &go){
+ return go->getComponent<TransformComponent>();
+}
+
+
+void AIMovementSystem::update(double deltaTime){
+ for (auto &go : m_dynamic_gameobjects){
+ if (go.second->hasComponent<AIBehaviorComponent>()){
+ go.second->getComponent<AIBehaviorComponent>()->update(deltaTime);
+ }
+ }
+}
+
+
+
+
+void AIMovementSystem::draw(){}
+void AIMovementSystem::scrollEvent(double distance){}
+void AIMovementSystem::mousePosEvent(double xpos, double ypos){}
+