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 SetSprite(const graphics::Sprite *s) { sprite = s; }
42 graphics::AnimationRunner &Animation() { return animation; }
43 const graphics::AnimationRunner &Animation() const { return animation; }
45 void SetOrientation(Orientation);
48 bool TileLock(int width, int height) const;
50 void Update(float deltaT);
52 void Render(SDL_Surface *, const geometry::Vector<int> &offset) const;
55 void UpdateVelocity();
58 const graphics::Sprite *sprite;
59 graphics::AnimationRunner animation;
60 geometry::Vector<float> position;
61 geometry::Vector<float> velocity;
62 Orientation orientation;
69 #endif /* MAP_ENTITY_H_ */