From f27937e6e9b6a7146dd09fc711d2d293ecf5abbf Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 14 Apr 2024 21:49:20 +0200 Subject: update --- Scenes/Utilities.gd | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Scenes/Utilities.gd') diff --git a/Scenes/Utilities.gd b/Scenes/Utilities.gd index f7a5d5d..8dbe666 100644 --- a/Scenes/Utilities.gd +++ b/Scenes/Utilities.gd @@ -38,11 +38,16 @@ func change_scene_with_fade(scene): func change_scene_with_player_to_position( - scene: Node2D, player: Player, targetPlayerPositionNodePath: NodePath + scene: Node2D, + player: Player, + targetPlayerPositionNodePath: NodePath, + facing: String ): Global.player = player Global.last_area = null + player.get_node("AnimatedSprite2D").play("idle_" + facing) + var targetPlayerPositionNode = scene.get_node(targetPlayerPositionNodePath) player.position = targetPlayerPositionNode.position scene.add_child(player) -- cgit v1.2.3