X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FCharacter.hh;h=0a3f9f40d0724a26e2fdbaa1457ec8f1ab7f9932;hp=96ac499001110bf1882d5f93e3c2634f4aa265b2;hb=25aefe01ef7dbdb603c51411e04b0d6a6107684f;hpb=d50942708db230dc5c43b8df89ede45525e1c394 diff --git a/src/Character.hh b/src/Character.hh index 96ac499..0a3f9f4 100644 --- a/src/Character.hh +++ b/src/Character.hh @@ -123,7 +123,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; @@ -143,6 +143,8 @@ private: static const Mf::Scalar z = 96.0; + Mf::Vector2 userForce; + Mf::Tilemap tilemap_; Mf::Animation animation_; @@ -150,13 +152,13 @@ private: public: - inline static CharacterP alloc(const std::string& name) + static CharacterP alloc(const std::string& name) { return CharacterP(new Character(name)); } Character(const std::string& name); - inline virtual ~Character() {} + virtual ~Character() {} void update(Mf::Scalar t, Mf::Scalar dt); void handleEvent(const Mf::Event& event);