GEJM  1.0.0.0
a 2D platformer made by students
Controller.h
1 #ifndef CONTROLLER_H
2 #define CONTROLLER_H
3 
4 #include "Creature.h"
5 
11 enum class ControllerState
12 {
16  GoingLeft,
17 
21  GoingRight,
22 
26  NotGoing
27 };
28 
34 {
35 public:
36 
44  Controller(Creature* creature, double maxSpeed = 1.0);
45 
49  virtual ~Controller();
50 
59  virtual void control();
60 
66  Creature* getCreature();
67 
72  ControllerState getControllerState();
73 protected:
78 
83  ControllerState controllerState;
84 
88  double const maxSpeed;
89 
95  void goLeft();
96 
102  void goRight();
103 
109  void stopGoing();
110 
114  Controller& operator=(Controller const&) = delete;
115 };
116 
117 #endif // CONTROLLER_H
Definition: Creature.h:74
Definition: Controller.h:33
ControllerState controllerState
Definition: Controller.h:83
double const maxSpeed
Definition: Controller.h:88
Creature * creature
Definition: Controller.h:77