From 5e0e83f23edf4ef782f1a7773f2e5d1d2594faf3 Mon Sep 17 00:00:00 2001 From: balloonpopper <5151242+balloonpopper@users.noreply.github.com> Date: Wed, 16 Feb 2022 04:24:08 +1100 Subject: [PATCH] feat: Debug set state animations (#495) Co-authored-by: Balloonpopper --- .../game/core-scripts/esc/types/esc_object.gd | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/addons/escoria-core/game/core-scripts/esc/types/esc_object.gd b/addons/escoria-core/game/core-scripts/esc/types/esc_object.gd index 9d6eee0b..43c48213 100644 --- a/addons/escoria-core/game/core-scripts/esc/types/esc_object.gd +++ b/addons/escoria-core/game/core-scripts/esc/types/esc_object.gd @@ -45,9 +45,25 @@ func set_state(p_state: String, immediate: bool = false): var actual_animator if animation_node.has_animation(p_state): if immediate: + escoria.logger.debug( + "State \"%s\" set. Matching immediate animation executing." % [ + p_state + ] + ) animation_node.seek_end(p_state) else: + escoria.logger.debug( + "State \"%s\" set. Matching non-immediate animation executing." % [ + p_state + ] + ) animation_node.play(p_state) + else: + escoria.logger.debug( + "State \"%s\" set. No matching animation found." % [ + p_state + ] + ) # Set the active value, thus hiding or showing the object