X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fworld%2FEntity.h;h=21663d31c216f230c1f5cc960f865589ba0c530a;hb=a73a6dd63407b5f5ef5b0c635551ad27b27c95d6;hp=f9671ca03cb13e7f4c45ee410dede7be463476a6;hpb=4a51a83bdff30d1e25a5867cfb19936adc0034b1;p=orbi.git diff --git a/src/world/Entity.h b/src/world/Entity.h index f9671ca..21663d3 100644 --- a/src/world/Entity.h +++ b/src/world/Entity.h @@ -11,23 +11,26 @@ class Entity { public: constexpr Entity() { } + virtual ~Entity() { } public: void Update(float dt, Vector extAcc, Vector tv); - void Move(Vector delta) { bounds.Move(delta); } + void Move(Vector delta); public: - AABB &Bounds() { return bounds; } - const AABB &Bounds() const { return bounds; } - -private: - AABB bounds; + Vector pos; Vector vel; Vector acc; + AABB bounds; + AABB vbox; + AABB hbox; + float mass = 1.0f; float elast = 0.75f; + bool onGround = false; + }; }