4 * Created on: Sep 29, 2012
11 #include "../geometry/Vector.h"
12 #include "../graphics/fwd.h"
13 #include "../graphics/Animation.h"
28 ORIENTATION_NORTH = 0,
30 ORIENTATION_SOUTH = 2,
35 geometry::Vector<float> &Position() { return position; }
36 const geometry::Vector<float> &Position() const { return position; }
38 geometry::Vector<float> &Velocity() { return velocity; }
39 const geometry::Vector<float> &Velocity() const { return velocity; }
41 void SetAnimation(const graphics::Animation *a);
42 void StartAnimation(app::Application &ctrl);
43 void StartAnimation(app::State &ctrl);
45 bool AnimationRunning() const { return runner.Running(); }
47 void SetOrientation(Orientation);
48 Orientation GetOrientation() const { return orientation; }
51 Entity *Follower() { return follower; }
52 const Entity *Follower() const { return follower; }
53 void AddFollower(Entity *);
54 void RemoveFollower(Entity *);
56 bool TileLock(int width, int height) const;
58 void Update(float deltaT);
60 void Render(SDL_Surface *, const geometry::Vector<int> &offset) const;
63 void UpdateVelocity();;
67 const graphics::Animation *animation;
68 graphics::AnimationRunner runner;
69 geometry::Vector<float> position;
70 geometry::Vector<float> velocity;
71 Orientation orientation;
78 #endif /* MAP_ENTITY_H_ */