X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FEntity.h;h=e1ede977e65888eea33360f20a37b3f91aa63a93;hb=817aaf3ab0a935280f7366bccf963cb911d2fa31;hp=d6ba5f3a3763dc2acd3aefd4697fde9d33bef8c5;hpb=657eed00ae73b8d06470cec0d955aeada537a90d;p=l2e.git diff --git a/src/map/Entity.h b/src/map/Entity.h index d6ba5f3..e1ede97 100644 --- a/src/map/Entity.h +++ b/src/map/Entity.h @@ -23,6 +23,14 @@ public: Entity(); ~Entity() { } +public: + enum Orientation { + ORIENTATION_NORTH = 0, + ORIENTATION_EAST = 1, + ORIENTATION_SOUTH = 2, + ORIENTATION_WEST = 3, + }; + public: geometry::Vector &Position() { return position; } const geometry::Vector &Position() const { return position; } @@ -34,17 +42,26 @@ public: graphics::AnimationRunner &Animation() { return animation; } const graphics::AnimationRunner &Animation() const { return animation; } + void SetOrientation(Orientation); + Orientation GetOrientation() const { return orientation; } + void SetSpeed(float); + bool TileLock(int width, int height) const; void Update(float deltaT); void Render(SDL_Surface *, const geometry::Vector &offset) const; +private: + void UpdateVelocity(); + private: const graphics::Sprite *sprite; graphics::AnimationRunner animation; geometry::Vector position; geometry::Vector velocity; + Orientation orientation; + float speed; };