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) { runner.Start(ctrl); }
43 void StartAnimation(app::State &ctrl) { runner.Start(ctrl); }
44 void StopAnimation() { runner.Stop(); }
45 bool AnimationRunning() const { return runner.Running(); }
47 void SetOrientation(Orientation);
48 Orientation GetOrientation() const { return orientation; }
51 bool TileLock(int width, int height) const;
53 void Update(float deltaT);
55 void Render(SDL_Surface *, const geometry::Vector<int> &offset) const;
58 void UpdateVelocity();
61 const graphics::Animation *animation;
62 graphics::AnimationRunner runner;
63 geometry::Vector<float> position;
64 geometry::Vector<float> velocity;
65 Orientation orientation;
72 #endif /* MAP_ENTITY_H_ */