diff options
author | jjesswan <jessica_wan@brown.edu> | 2024-04-22 21:56:26 -0400 |
---|---|---|
committer | jjesswan <jessica_wan@brown.edu> | 2024-04-22 21:56:26 -0400 |
commit | a556b45abf18f1bd509daaf63b66b7d55e9fd291 (patch) | |
tree | bc9b8a2d184c12aee236e7f9f276a34b84ca552d /engine-ocean/Game/Systems/Pathfinding/aimovementsystem.h | |
parent | cd7c76017a12bb548036571c1ff13e551369d06d (diff) |
add engine version
Diffstat (limited to 'engine-ocean/Game/Systems/Pathfinding/aimovementsystem.h')
-rw-r--r-- | engine-ocean/Game/Systems/Pathfinding/aimovementsystem.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/engine-ocean/Game/Systems/Pathfinding/aimovementsystem.h b/engine-ocean/Game/Systems/Pathfinding/aimovementsystem.h new file mode 100644 index 0000000..e880e44 --- /dev/null +++ b/engine-ocean/Game/Systems/Pathfinding/aimovementsystem.h @@ -0,0 +1,34 @@ +#ifndef AIMOVEMENTSYSTEM_H +#define AIMOVEMENTSYSTEM_H +#include "Game/Components/TransformComponent.h" +#include "Game/Systems/Pathfinding/pathfinder.h" +#include "Game/Systems/system.h" + + +class AIMovementSystem : public System +{ +public: + AIMovementSystem(std::map<std::string, std::shared_ptr<GameObject>>& dynamic_gameobjects, + std::map<std::string, std::shared_ptr<GameObject>>& rigid_gameobjects); + void draw() override; + void update(double deltaTime) override; + void scrollEvent(double distance) override; + void mousePosEvent(double xpos, double ypos) override; + +private: + float gravitySimulation(float &initial_v, double deltaTime, float snapshot_time, float gravity); + TransformComponent* getTransform(std::shared_ptr<GameObject> &go); + + std::map<std::string, std::shared_ptr<GameObject>>& m_dynamic_gameobjects; + std::map<std::string, std::shared_ptr<GameObject>>& m_rigid_gameobjects; + + + float horiz_velocity = .005f; + float snapshot_time = 0.f; + + std::vector<glm::vec3> m_path; + + //std::shared_ptr<Pathfinder> m_pathfinder; +}; + +#endif // AIMOVEMENTSYSTEM_H |