- Target &target = get_slot(obj);
- if(target.animations.empty())
- target.base_matrix = *obj.get_matrix();
- // TODO check for incompatible armature
- target.stacked = true;
- target.armature = anim.get_armature();
- target.animations.push_back(PlayingAnimation(anim));
+ Target &target = play_(obj, anim, false, speed);
+ target.object = &obj;
+}
+
+void AnimationPlayer::play(Placeable &obj, const Animation &anim, float speed)
+{
+ play_(obj, anim, false, speed);
+}
+
+void AnimationPlayer::play_stacked(AnimatedObject &obj, const Animation &anim, float speed)
+{
+ Target &target = play_(obj, anim, true, speed);
+ target.object = &obj;
+}
+
+void AnimationPlayer::play_stacked(Placeable &obj, const Animation &anim, float speed)
+{
+ play_(obj, anim, true, speed);