#ifndef _CHARACTER_HH_
#define _CHARACTER_HH_
-#include <Moof/Animation.hh>
-#include <Moof/Drawable.hh>
-#include <Moof/Resource.hh>
-#include <Moof/Tilemap.hh>
+#include <boost/shared_ptr.hpp>
+
+#include <Moof/Aabb.hh>
+#include <Moof/Entity.hh>
+#include <Moof/Math.hh>
+#include <Moof/Octree.hh>
+#include <Moof/Physics.hh>
+#include <Moof/Sphere.hh>
+
+#include "Animation.hh"
+#include "Tilemap.hh"
+
+
+
+struct Character;
+typedef boost::shared_ptr<Character> CharacterP;
/**
- * Parent class of animate objects with "personalities."
+ * Parent class of animate objects with "personalities." This basically
+ * includes the heroine herself and the bad guys.
*/
-class Character : public Mf::Drawable
+struct Character : public Mf::Entity, public Mf::OctreeInsertable
{
+protected:
+
+ Mf::Vector2 userForce;
+
public:
+
Character(const std::string& name);
- ~Character();
+ virtual ~Character() {}
+
+ virtual void update(Mf::Scalar t, Mf::Scalar dt);
+ virtual void draw(Mf::Scalar alpha) const;
- void draw(Mf::Scalar alpha) const;
+ virtual bool isInsideAabb(const Mf::Aabb& aabb) const;
+ virtual int getOctant(const Mf::Aabb& aabb) const;
- Mf::Tilemap& getTilemap();
- Mf::Animation& getAnimation();
+ Mf::State2 previous;
+ Mf::State2 current;
+
+ Tilemap tilemap;
+ Animation animation;
+
+ Mf::Aabb aabb_;
+ Mf::Sphere sphere_;
private:
- Mf::Tilemap tilemap;
- Mf::Animation animation;
+
+ static const Mf::Scalar z = 96.0;
};