]> Dogcows Code - chaz/yoink/blobdiff - src/Character.hh
house-keeping
[chaz/yoink] / src / Character.hh
index 2894c5ebcd35f0591840b9cf33a6514a915358f4..28e588b627da8ccc0b45b49dc80cbac1b37fc258 100644 (file)
 #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"
+
+
+
+class 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();
+       virtual ~Character() {}
+
+       virtual void update(Mf::Scalar t, Mf::Scalar dt);
+       virtual void draw(Mf::Scalar alpha) const;
+
+       void setZCoord(Mf::Scalar z);
 
-       void draw(Mf::Scalar alpha);
+       void addImpulse(Mf::Vector2 impulse);
+       void addForce(Mf::Vector2 force);
+       void setPosition(Mf::Vector2 position);
 
-       Mf::Tilemap& getTilemap();
-       Mf::Animation& getAnimation();
+       virtual int getOctant(const Mf::Aabb& aabb) const;
+
+       Tilemap         tilemap;
+       Animation       animation;
 
 private:
-       Mf::Tilemap tilemap;
-       Mf::Animation animation;
+
+       mutable Mf::Scalar mZCoord;
 };
 
 
This page took 0.023726 seconds and 4 git commands to generate.