#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/RigidBody.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
+class Character : public Mf::RigidBody2, public Mf::OctreeInsertable
{
public:
- Character(const std::string& name);
- ~Character();
- void draw(Mf::Scalar alpha);
+ Character(const std::string& name);
+ virtual ~Character() {}
- Mf::Tilemap& getTilemap();
- Mf::Animation& getAnimation();
+ virtual void update(Mf::Scalar t, Mf::Scalar dt);
+ virtual void draw(Mf::Scalar alpha) const;
+ virtual int getOctant(const Mf::Aabb& aabb) const;
- struct Exception : public std::runtime_error
- {
- explicit Exception(const std::string& what_arg) :
- std::runtime_error(what_arg) {}
- };
+ Tilemap tilemap;
+ Animation animation;
private:
- Mf::Tilemap tilemap;
- Mf::Animation animation;
+
+ static const Mf::Scalar z = 96.0;
};