From: Daniel Karbach Date: Mon, 20 Aug 2012 21:49:56 +0000 (+0200) Subject: adjusted NumberAnimation to use animation runner X-Git-Url: http://git.localhorst.tv/?a=commitdiff_plain;h=2d54ee208839678d0125a53c7973c098fd8c98b7;p=l2e.git adjusted NumberAnimation to use animation runner --- diff --git a/src/battle/NumberAnimation.cpp b/src/battle/NumberAnimation.cpp index 7002f57..17eb771 100644 --- a/src/battle/NumberAnimation.cpp +++ b/src/battle/NumberAnimation.cpp @@ -13,17 +13,18 @@ using app::State; using geometry::Point; using geometry::Vector; -using graphics::ComplexAnimation; +using graphics::Animation; +using graphics::AnimationRunner; using graphics::Sprite; namespace battle { -NumberAnimation::NumberAnimation(int number, const ComplexAnimation &a, const Sprite *numbers) +NumberAnimation::NumberAnimation(int number, const Animation *a, const Sprite *numbers) : number(number) { - animation[0] = a; - animation[1] = a; - animation[2] = a; - animation[3] = a; + animation[0] = AnimationRunner(a); + animation[1] = AnimationRunner(a); + animation[2] = AnimationRunner(a); + animation[3] = AnimationRunner(a); animation[0].ChangeSprite(numbers); animation[1].ChangeSprite(numbers); diff --git a/src/battle/NumberAnimation.h b/src/battle/NumberAnimation.h index 2c96b5e..08ca01f 100644 --- a/src/battle/NumberAnimation.h +++ b/src/battle/NumberAnimation.h @@ -8,7 +8,7 @@ #ifndef BATTLE_NUMBERANIMATION_H_ #define BATTLE_NUMBERANIMATION_H_ -#include "../graphics/ComplexAnimation.h" +#include "../graphics/Animation.h" #include "../geometry/Point.h" @@ -23,7 +23,7 @@ class NumberAnimation { public: NumberAnimation() : number(-1) { } - NumberAnimation(int number, const graphics::ComplexAnimation &prototype, const graphics::Sprite *numbers); + NumberAnimation(int number, const graphics::Animation *prototype, const graphics::Sprite *numbers); public: void Start(app::State &); @@ -37,7 +37,7 @@ public: private: int number; - graphics::ComplexAnimation animation[4]; + graphics::AnimationRunner animation[4]; };