X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FCharacter.hh;h=c19206c416a022e1bcabce36c0a591facc35fc22;hp=96ac499001110bf1882d5f93e3c2634f4aa265b2;hb=a4debfe4a5f5d339410788971b698ba00cb7f09c;hpb=d50942708db230dc5c43b8df89ede45525e1c394 diff --git a/src/Character.hh b/src/Character.hh index 96ac499..c19206c 100644 --- a/src/Character.hh +++ b/src/Character.hh @@ -35,7 +35,6 @@ #include #include #include -#include #include #include @@ -123,7 +122,7 @@ struct Character : public Mf::Entity return state; } - State operator+(State state) const + State operator+(const State& state) const { State newState = *this; newState.position += state.position; @@ -136,8 +135,6 @@ struct Character : public Mf::Entity State previous; State current; - Mf::OctreeNodeP treeNode; - private: @@ -146,21 +143,19 @@ private: Mf::Tilemap tilemap_; Mf::Animation animation_; - void updateContainers(); + //void updateContainers(); -public: +protected: - inline static CharacterP alloc(const std::string& name) - { - return CharacterP(new Character(name)); - } + Mf::Vector2 userForce; + +public: Character(const std::string& name); - inline virtual ~Character() {} + virtual ~Character() {} - void update(Mf::Scalar t, Mf::Scalar dt); - void handleEvent(const Mf::Event& event); - void draw(Mf::Scalar alpha) const; + virtual void update(Mf::Scalar t, Mf::Scalar dt); + virtual void draw(Mf::Scalar alpha) const; Mf::Tilemap& getTilemap(); Mf::Animation& getAnimation();