]> git.localhorst.tv Git - orbi.git/blob - src/world/Entity.h
orientation for entities
[orbi.git] / src / world / Entity.h
1 #ifndef ORBI_ENTITY_H_
2 #define ORBI_ENTITY_H_
3
4 #include "AABB.h"
5 #include "../graphics/Vector.h"
6
7
8 namespace orbi {
9
10 class Entity {
11
12 public:
13         enum Orientation {
14                 LOOKS_LEFT,
15                 LOOKS_RIGHT,
16         };
17
18 public:
19         constexpr Entity() { }
20         virtual ~Entity() { }
21
22 public:
23         void Update(float dt, Vector<float> extAcc, Vector<float> tv);
24         void Move(Vector<float> delta);
25
26 public:
27         Vector<float> pos;
28         Vector<float> vel;
29         Vector<float> acc;
30
31         AABB bounds;
32         AABB vbox;
33         AABB hbox;
34
35         Orientation orient = LOOKS_LEFT;
36
37         bool onGround = false;
38
39 };
40
41 }
42
43 #endif