X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FCharacter.hh;h=82804babf16b32b37ae4db339229398ef3a8983b;hb=81ff940d1bea07447f8218ab9a764fbf393431e8;hp=50c3da51a6418582569a88145be462acc5b017d6;hpb=64bd443538f57ad1bdff6c6b35953e72141129b2;p=chaz%2Fyoink diff --git a/src/Character.hh b/src/Character.hh index 50c3da5..82804ba 100644 --- a/src/Character.hh +++ b/src/Character.hh @@ -34,16 +34,15 @@ #include #include #include -#include -#include +#include #include +#include #include "Animation.hh" -#include "Tilemap.hh" -struct Character; +class Character; typedef boost::shared_ptr CharacterP; @@ -52,12 +51,8 @@ typedef boost::shared_ptr CharacterP; * includes the heroine herself and the bad guys. */ -struct Character : public Mf::Entity, public Mf::OctreeInsertable +class Character : public Mf::RigidBody2 { -protected: - - Mf::Vector2 userForce; - public: Character(const std::string& name); @@ -66,21 +61,14 @@ public: virtual void update(Mf::Scalar t, Mf::Scalar dt); virtual void draw(Mf::Scalar alpha) const; - virtual bool isInsideAabb(const Mf::Aabb& aabb) const; - virtual int getOctant(const Mf::Aabb& aabb) const; - - Mf::State2 previous; - Mf::State2 current; - - Tilemap tilemap; - Animation animation; - - Mf::Aabb aabb_; - Mf::Sphere sphere_; + void addImpulse(Mf::Vector2 impulse); + void addForce(Mf::Vector2 force); + void setPosition(Mf::Vector2 position); -private: + //virtual int getOctant(const Mf::Aabb<3>& aabb) const; - static const Mf::Scalar z = 96.0; + Mf::Texture tilemap; + Animation animation; };