X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fanimationplayer.cpp;h=7c693ad2c3eef32ce7ec2a8aa74f4e754d130258;hp=6b5a481f6a74f8da98b138067d803d8aacfbe785;hb=bf1f59c4dca6b651e39c126c63a0780b65a34927;hpb=19555043d70f972feedb89786fc24a2b83b4f7e9 diff --git a/source/animationplayer.cpp b/source/animationplayer.cpp index 6b5a481f..7c693ad2 100644 --- a/source/animationplayer.cpp +++ b/source/animationplayer.cpp @@ -130,7 +130,7 @@ void AnimationPlayer::tick_single(Target &target, const Time::TimeDelta &dt) anim.iterator.dispatch_events(target); - if(!anim.iterator.is_end()) + if(anim.iterator.is_end()) target.animations.clear(); } @@ -192,6 +192,12 @@ void AnimationPlayer::set_object_uniform(AnimatedObject &obj, const string &name } +AnimationPlayer::PlayingAnimation::PlayingAnimation(const Animation &a): + animation(&a), + iterator(*animation) +{ } + + AnimationPlayer::Target::Target(AnimatedObject &o): object(o), armature(0), @@ -204,11 +210,5 @@ void AnimationPlayer::Target::animation_event(AnimatedObject *, const string &na (*i)->animation_event(&object, name, value); } - -AnimationPlayer::PlayingAnimation::PlayingAnimation(const Animation &a): - animation(&a), - iterator(*animation) -{ } - } // namespace GL } // namespace Msp