summaryrefslogtreecommitdiff
path: root/Scenes/Utilities.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-04-14 21:49:20 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-04-14 21:49:20 +0200
commitf27937e6e9b6a7146dd09fc711d2d293ecf5abbf (patch)
treee0ddd5e6d356000e4f29af6211a736284a4972ee /Scenes/Utilities.gd
parent96d36cee33d6321834565f0a5d412ef95c5ceffd (diff)
update
Diffstat (limited to 'Scenes/Utilities.gd')
-rw-r--r--Scenes/Utilities.gd7
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)