X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FCharacter.hh;h=6507906d067cf9c3d78162dd6a32916fafa9b76e;hp=50c3da51a6418582569a88145be462acc5b017d6;hb=b357615aba1dbde81e3c6999366604e6001010a7;hpb=64bd443538f57ad1bdff6c6b35953e72141129b2 diff --git a/src/Character.hh b/src/Character.hh index 50c3da5..6507906 100644 --- a/src/Character.hh +++ b/src/Character.hh @@ -34,8 +34,7 @@ #include #include #include -#include -#include +#include #include #include "Animation.hh" @@ -43,7 +42,7 @@ -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; + Tilemap tilemap; + Animation animation; };