summaryrefslogtreecommitdiff
path: root/engine-ocean/Game/Systems/objectcreationsystem.h
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/objectcreationsystem.h
parentcd7c76017a12bb548036571c1ff13e551369d06d (diff)
add engine version
Diffstat (limited to 'engine-ocean/Game/Systems/objectcreationsystem.h')
-rw-r--r--engine-ocean/Game/Systems/objectcreationsystem.h82
1 files changed, 82 insertions, 0 deletions
diff --git a/engine-ocean/Game/Systems/objectcreationsystem.h b/engine-ocean/Game/Systems/objectcreationsystem.h
new file mode 100644
index 0000000..ce30cde
--- /dev/null
+++ b/engine-ocean/Game/Systems/objectcreationsystem.h
@@ -0,0 +1,82 @@
+#ifndef OBJECTCREATIONSYSTEM_H
+#define OBJECTCREATIONSYSTEM_H
+
+
+#include "Game/GameObjects/GameObject.h"
+#include "Game/Systems/aisystem.h"
+#include "Game/Ocean/ocean.h"
+
+#include "system.h"
+
+
+class ObjectCreationSystem : public System
+{
+public:
+ ObjectCreationSystem(std::map<std::string, std::shared_ptr<GameObject>>& gameobjects,
+ std::map<std::string, std::shared_ptr<GameObject>>& dynamic_gameobjects,
+ std::map<std::string, std::shared_ptr<GameObject>>& rigid_gameobjects,
+ std::map<std::string, BlackboardData>& global_blackboard,
+ std::map<std::string, std::vector<std::shared_ptr<GameObject>>>& lootables);
+ void draw() override;
+ void update(double deltaTime) override;
+ void scrollEvent(double distance) override;
+ void mousePosEvent(double xpos, double ypos) override;
+
+private:
+ void initializeAllObjects();
+ void initializePlayerObject();
+ void initializeGroundObject();
+ void initializeObstacle();
+ void generateBamboo();
+ void generateBall(glm::vec3 scale, glm::vec3 pos, int number);
+ void addObject_NoTransform(std::string shape_name, std::string obj_name, std::string filename);
+ void makeBVHDemo();
+ void initializeBackground();
+ void initOcean();
+
+
+
+ void makeLootable(std::string shapename, std::string filename, int count, glm::vec3 scale);
+
+
+
+
+
+ void initializeCeilingMesh();
+ void initializeSlopedGround();
+ void initializeGround();
+ void addLight();
+ void makeNavMesh();
+
+
+
+
+ void insertAnyObject(const std::string name, const std::shared_ptr<GameObject> &game_obj);
+ void insertDynamicObject(const std::string name, const std::shared_ptr<GameObject> &game_obj);
+ void insertRigidObject(const std::string name, const std::shared_ptr<GameObject> &game_obj);
+
+
+
+
+ std::map<std::string, std::shared_ptr<GameObject>>& m_gameobjects;
+ std::map<std::string, std::shared_ptr<GameObject>>& m_dynamic_gameobjects;
+ std::map<std::string, std::shared_ptr<GameObject>>& m_rigid_gameobjects;
+
+ std::map<std::string, BlackboardData>& m_global_blackboard;
+
+ std::map<std::string, std::vector<std::shared_ptr<GameObject>>>& m_lootables;
+
+
+ float m_groundBounds = 0.f;
+ float m_ground_level = 0.f;
+
+
+ ocean m_ocean;
+ std::shared_ptr<GameObject> m_ocean_shape;
+ double m_time = 0.0;
+ double m_timestep = .01;
+
+
+};
+
+#endif // OBJECTCREATIONSYSTEM_H