X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FEntity.h;h=12f22c947aae0c903a2468382c0261217ae76456;hb=0fc36d261ef8129debbd4aa15594bc46cb82eb27;hp=926c360fef144d740c4cc7f460372aadb3644b87;hpb=72988b5f9bd449cffea97273bebfc788735ce14d;p=l2e.git diff --git a/src/map/Entity.h b/src/map/Entity.h index 926c360..12f22c9 100644 --- a/src/map/Entity.h +++ b/src/map/Entity.h @@ -38,17 +38,25 @@ public: geometry::Vector &Velocity() { return velocity; } const geometry::Vector &Velocity() const { return velocity; } + geometry::Vector &SpriteOffset() { return spriteOffset; } + const geometry::Vector &SpriteOffset() const { return spriteOffset; } + void SetAnimation(const graphics::Animation *a); - void StartAnimation(app::Application &ctrl) { runner.Start(ctrl); } - void StartAnimation(app::State &ctrl) { runner.Start(ctrl); } - void StopAnimation() { runner.Stop(); } + void StartAnimation(app::Application &ctrl); + void StartAnimation(app::State &ctrl); + void StopAnimation(); bool AnimationRunning() const { return runner.Running(); } void SetOrientation(Orientation); Orientation GetOrientation() const { return orientation; } void SetSpeed(float); - bool TileLock(int width, int height) const; + Entity *Follower() { return follower; } + const Entity *Follower() const { return follower; } + void AddFollower(Entity *); + void RemoveFollower(Entity *); + + bool TileLock(const geometry::Vector &tileSize) const; void Update(float deltaT); @@ -58,8 +66,10 @@ private: void UpdateVelocity(); private: + Entity *follower; const graphics::Animation *animation; graphics::AnimationRunner runner; + geometry::Vector spriteOffset; geometry::Vector position; geometry::Vector velocity; Orientation orientation;