]> Dogcows Code - chaz/yoink/blobdiff - src/Character.hh
fixed layer bugs; generalized octree
[chaz/yoink] / src / Character.hh
index 96ac499001110bf1882d5f93e3c2634f4aa265b2..c19206c416a022e1bcabce36c0a591facc35fc22 100644 (file)
@@ -35,7 +35,6 @@
 #include <Moof/Entity.hh>
 #include <Moof/Event.hh>
 #include <Moof/Math.hh>
-#include <Moof/Octree.hh>
 #include <Moof/RK4.hh>
 #include <Moof/Tilemap.hh>
 
@@ -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();
This page took 0.018116 seconds and 4 git commands to generate.