+/*
+ * Entity.h
+ *
+ * Created on: Sep 29, 2012
+ * Author: holy
+ */
+
+#ifndef MAP_ENTITY_H_
+#define MAP_ENTITY_H_
+
+#include "../geometry/Vector.h"
+#include "../graphics/fwd.h"
+#include "../graphics/Animation.h"
+
+#include <functional>
+#include <SDL.h>
+
+namespace map {
+
+class Entity {
+
+public:
+ Entity();
+ ~Entity() { }
+
+public:
+ geometry::Vector<float> &Position() { return position; }
+ const geometry::Vector<float> &Position() const { return position; }
+
+ geometry::Vector<float> &Velocity() { return velocity; }
+ const geometry::Vector<float> &Velocity() const { return velocity; }
+
+ void SetSprite(const graphics::Sprite *s) { sprite = s; }
+ graphics::AnimationRunner &Animation() { return animation; }
+ const graphics::AnimationRunner &Animation() const { return animation; }
+
+ void Update(float deltaT);
+
+ void Render(SDL_Surface *, const geometry::Vector<int> &offset) const;
+
+private:
+ const graphics::Sprite *sprite;
+ graphics::AnimationRunner animation;
+ geometry::Vector<float> position;
+ geometry::Vector<float> velocity;
+
+};
+
+}
+
+#endif /* MAP_ENTITY_H_ */