X-Git-Url: http://git.tdb.fi/?p=libs%2Fdemoscene.git;a=blobdiff_plain;f=source%2Fanimate.cpp;fp=source%2Fanimate.cpp;h=cd6cda1d8faee1ccca2f6ecdd7cf19abefbf0c1b;hp=28129156796426e244593ad8787c1e2c6dcba894;hb=02613d179c906075a0ad05a3aae46b3811f322aa;hpb=727cdde392eb7d2e892f8a308ab0d16b70947070 diff --git a/source/animate.cpp b/source/animate.cpp index 2812915..cd6cda1 100644 --- a/source/animate.cpp +++ b/source/animate.cpp @@ -9,6 +9,7 @@ namespace DemoScene { Animate::Animate(): target(0), anim(0), + stacked(false), player(0) { } @@ -33,7 +34,10 @@ void Animate::start(float, float d) float speed = 1.0f; if(!anim->is_looping() && d) speed = (anim->get_duration()/Time::sec)/d; - player->play(*target, *anim, speed); + if(stacked) + player->play_stacked(*target, *anim, speed); + else + player->play(*target, *anim, speed); } @@ -42,6 +46,7 @@ Animate::Loader::Loader(Animate &a, Demo &d): { a.player = &demo.get_animation_player(); add("animation", &Loader::animation); + add("stacked", &Animate::stacked); add("target", &Loader::target); }