From 3fc6a0663e9d11d731f8d8b444a50a9d25b32adb Mon Sep 17 00:00:00 2001 From: Elijah Voigt Date: Mon, 28 Aug 2023 15:35:06 -0700 Subject: [PATCH] fixed animation play/pause/resume bug --- bin/editor.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/editor.rs b/bin/editor.rs index 9c54a50..ad4c7fb 100644 --- a/bin/editor.rs +++ b/bin/editor.rs @@ -3,6 +3,7 @@ // Editor for creating Monologue Trees levels // // BUGS: +// * Camera order ambiguity // * Multi-GLTF UX is bad. // * Consider GLTF hierarchy (GLTF1 > Scene1a/Scene1b, GlTF2 > Scene2a/Scene2b, etc) // * Easy despawn when de-selecting gltf @@ -963,7 +964,11 @@ mod animations { .iter_mut() .filter(|(_, name)| clip.compatible_with(name)) .for_each(|(mut player, _)| { - player.play(handle.clone()).repeat(); + if player.is_paused() { + player.resume(); + } else { + player.play(handle.clone()).repeat(); + } }) } });