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);
46 Orientation GetOrientation() const { return orientation; }
49 bool TileLock(int width, int height) const;
51 void Update(float deltaT);
53 void Render(SDL_Surface *, const geometry::Vector<int> &offset) const;
56 void UpdateVelocity();
59 const graphics::Sprite *sprite;
60 graphics::AnimationRunner animation;
61 geometry::Vector<float> position;
62 geometry::Vector<float> velocity;
63 Orientation orientation;
70 #endif /* MAP_ENTITY_H_ */