Skip to content

Commit

Permalink
fix: Fixes signal handling on AnimationPlayer nodes. (#458)
Browse files Browse the repository at this point in the history
Co-authored-by: Dennis Ploeger <[email protected]>
  • Loading branch information
dploeger and dploeger authored Nov 23, 2021
1 parent 14c6418 commit 860c6ad
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions addons/escoria-core/game/core-scripts/esc_animation_player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,19 @@ func play(name: String, backwards: bool = false):
self,
"_on_animation_finished"
)
_player_node.connect(
"animation_finished",
self,
"_on_animation_finished",
[name]
)
if _is_animation_player:
_player_node.connect(
"animation_finished",
self,
"_on_animation_finished"
)
else:
_player_node.connect(
"animation_finished",
self,
"_on_animation_finished",
[name]
)
if backwards and _is_animation_player:
_animation_player.play_backwards(name)
elif backwards:
Expand Down

0 comments on commit 860c6ad

Please sign in to comment.