From f24941db1b8fc0d74548f42fc69449e0ce6997f3 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Tue, 18 Aug 2020 12:02:36 +0200 Subject: [PATCH] Load game1 scene after campfire dialog --- scenes/game1.tscn | 2 -- scripts/game1/Game1Script.gd | 1 - scripts/scenes/IntroScript.gd | 1 + 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/scenes/game1.tscn b/scenes/game1.tscn index a75be78..3a376cd 100644 --- a/scenes/game1.tscn +++ b/scenes/game1.tscn @@ -55,7 +55,6 @@ frames = ExtResource( 7 ) [node name="Camera2D" type="Camera2D" parent="Game/Player"] [node name="Opening2" type="Node2D" parent="."] -visible = false [node name="Opening2Bg" type="AnimatedSprite" parent="Opening2"] frames = ExtResource( 2 ) @@ -104,6 +103,5 @@ position = Vector2( 210.738, 5 ) shape = SubResource( 4 ) [node name="Opening1" type="AnimatedSprite" parent="."] -visible = false frames = ExtResource( 1 ) centered = false diff --git a/scripts/game1/Game1Script.gd b/scripts/game1/Game1Script.gd index 9cd9b64..38840e5 100644 --- a/scripts/game1/Game1Script.gd +++ b/scripts/game1/Game1Script.gd @@ -7,7 +7,6 @@ onready var player = $Game/Player onready var player_camera = $Game/Player/Camera2D func _ready(): - launch_game() $Opening1.play('default') yield($Opening1, 'animation_finished') $Opening1.hide() diff --git a/scripts/scenes/IntroScript.gd b/scripts/scenes/IntroScript.gd index aec15b2..5f9fd7a 100644 --- a/scripts/scenes/IntroScript.gd +++ b/scripts/scenes/IntroScript.gd @@ -20,6 +20,7 @@ func _ready(): yield(get_tree().create_timer(2.0), 'timeout') yield(start_dialogue(intro_dialogue), 'end') + get_tree().change_scene("res://scenes/game1.tscn") func update_camera(): var animation = dialogue_box.expression