]> git.localhorst.tv Git - l2e.git/blobdiff - src/map/Entity.h
implemented followers
[l2e.git] / src / map / Entity.h
index 94090a1e547806790f3bf7331303749bfc1a7568..12f22c947aae0c903a2468382c0261217ae76456 100644 (file)
@@ -38,6 +38,9 @@ public:
        geometry::Vector<float> &Velocity() { return velocity; }
        const geometry::Vector<float> &Velocity() const { return velocity; }
 
+       geometry::Vector<float> &SpriteOffset() { return spriteOffset; }
+       const geometry::Vector<float> &SpriteOffset() const { return spriteOffset; }
+
        void SetAnimation(const graphics::Animation *a);
        void StartAnimation(app::Application &ctrl);
        void StartAnimation(app::State &ctrl);
@@ -53,19 +56,20 @@ public:
        void AddFollower(Entity *);
        void RemoveFollower(Entity *);
 
-       bool TileLock(int width, int height) const;
+       bool TileLock(const geometry::Vector<int> &tileSize) const;
 
        void Update(float deltaT);
 
        void Render(SDL_Surface *, const geometry::Vector<int> &offset) const;
 
 private:
-       void UpdateVelocity();;
+       void UpdateVelocity();
 
 private:
        Entity *follower;
        const graphics::Animation *animation;
        graphics::AnimationRunner runner;
+       geometry::Vector<float> spriteOffset;
        geometry::Vector<float> position;
        geometry::Vector<float> velocity;
        Orientation orientation;