diff options
Diffstat (limited to 'Scenes/Utilities.gd')
-rw-r--r-- | Scenes/Utilities.gd | 7 |
1 files changed, 6 insertions, 1 deletions
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) |