]> git.localhorst.tv Git - l2e.git/commitdiff
adjusted NumberAnimation to use animation runner
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 20 Aug 2012 21:49:56 +0000 (23:49 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 20 Aug 2012 21:49:56 +0000 (23:49 +0200)
src/battle/NumberAnimation.cpp
src/battle/NumberAnimation.h

index 7002f57c8c7e679f61630429435cbb1a3efab1ed..17eb771c64b91b7607b76b1c6e8d91f9983a38fb 100644 (file)
 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);
index 2c96b5e816d256587d3de658931ad87248aa86c5..08ca01ff2886f322916592c4f261f7938de5970b 100644 (file)
@@ -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];
 
 };