]> git.localhorst.tv Git - orbi.git/blobdiff - src/world/Entity.h
orientation for entities
[orbi.git] / src / world / Entity.h
index f8576c15374c33708fd010e20890197320266f43..83135f99115b10483a039e5f8754326b0eab3718 100644 (file)
@@ -9,20 +9,30 @@ namespace orbi {
 
 class Entity {
 
+public:
+       enum Orientation {
+               LOOKS_LEFT,
+               LOOKS_RIGHT,
+       };
+
 public:
        constexpr Entity() { }
+       virtual ~Entity() { }
 
 public:
        void Update(float dt, Vector<float> extAcc, Vector<float> tv);
-       void Move(Vector<float> delta) { bounds.Move(delta); }
+       void Move(Vector<float> delta);
 
 public:
-       AABB bounds;
+       Vector<float> pos;
        Vector<float> vel;
        Vector<float> acc;
 
-       float mass = 1.0f;
-       float elast = 0.75f;
+       AABB bounds;
+       AABB vbox;
+       AABB hbox;
+
+       Orientation orient = LOOKS_LEFT;
 
        bool onGround = false;