Untitled Game engine no.5  1.0
Controller.hpp
1 //
2 // Created by jibbo on 4/11/21.
3 //
4 
5 #ifndef ENGINE_PROJ_CONTROLLER_HPP
6 #define ENGINE_PROJ_CONTROLLER_HPP
7 
8 #include <utility>
9 
10 #include "Scene.hpp"
11 #include "Entity.hpp"
12 
13 namespace Engine {
18  virtual void Parse(ECS& ecs, const EntityID& id) {};
19  };
20 
25  float acceleration = 5000.0f;
26  float maxSpeed = 150.0f;
27  float jumpVelocity = 1000.0f;
28  public:
29  void Parse(ECS& ecs, const EntityID& id) override;
30  };
31 
35  struct Controller {
36  Ref<ControllerParser> controllerParser;
37  };
38 
39 
44  public:
49  static void Update(const Scene& scene);
50  };
51 
52 
53 }
54 
55 #endif //ENGINE_PROJ_CONTROLLER_HPP
Engine::ECS
Entity Component System.
Definition: ECS.hpp:19
Engine::ControllerSystem
System for processing control inputs.
Definition: Controller.hpp:43
Engine::Scene
A container for entities currently in the Scene.
Definition: Scene.hpp:9
Engine::Ref
std::shared_ptr< T > Ref
Has stuff for making references a lot more easily shared smart pointer.
Definition: Base.hpp:21
Engine::ControllerParser
Wrapper for parsing entities with controllers attached.
Definition: Controller.hpp:17
Engine::PlayerController
Unused data structure for character controls.
Definition: Controller.hpp:24
Engine
Definition: Animation.hpp:14
Engine::ControllerSystem::Update
static void Update(const Scene &scene)
Update all entities with controllers in the scene.
Definition: Controller.cpp:89
Engine::Controller
Scene component that contains a reference to a controller parser.
Definition: Controller.hpp:35