feat: Debug set state animations (#495)

Co-authored-by: Balloonpopper <balloonpopper@git.com>
This commit is contained in:
balloonpopperandBalloonpopper authored and GitHub committed 2022-02-15 18:24:08 +01:00
1 parent b39f5dc0fb
commit 5e0e83f23e
1 file changed
+16
@@ -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