Add tutorial scene

This commit is contained in:
Waldemar Tomme 2024-01-28 07:28:55 +01:00
parent 226313c974
commit 05227c75fd
3 changed files with 50 additions and 2 deletions

View File

@ -1,7 +1,7 @@
[gd_scene load_steps=8 format=3 uid="uid://dv2y18ye8j7o0"]
[ext_resource type="Script" path="res://scenes/main_menu_scene.gd" id="1_1foie"]
[ext_resource type="PackedScene" uid="uid://cik30de5gaaah" path="res://scenes/ingame_scene.tscn" id="2_nl5i6"]
[ext_resource type="PackedScene" uid="uid://dsbpdd7xdslx0" path="res://scenes/tutorial.tscn" id="2_o0xek"]
[ext_resource type="PackedScene" uid="uid://g4qhvbvdm62w" path="res://scenes/game_settings_scene.tscn" id="3_dgs4d"]
[ext_resource type="PackedScene" uid="uid://bkk87o2ooo6at" path="res://ui/overlays/fade_overlay.tscn" id="3_kf1us"]
[ext_resource type="PackedScene" uid="uid://b4blrdjthcxnn" path="res://ui/components/game_logo.tscn" id="4_fnufg"]
@ -13,7 +13,7 @@ font_color = Color(1, 1, 1, 0.486275)
[node name="MainMenuScene" type="Node2D"]
script = ExtResource("1_1foie")
game_scene = ExtResource("2_nl5i6")
game_scene = ExtResource("2_o0xek")
settings_scene = ExtResource("3_dgs4d")
[node name="UI" type="CanvasLayer" parent="."]

14
godot/scenes/tutorial.gd Normal file
View File

@ -0,0 +1,14 @@
extends Node2D
@export var next_scene: PackedScene
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_button_pressed():
get_tree().change_scene_to_packed(next_scene)

View File

@ -0,0 +1,34 @@
[gd_scene load_steps=3 format=3 uid="uid://dsbpdd7xdslx0"]
[ext_resource type="Script" path="res://scenes/tutorial.gd" id="1_i8rpu"]
[ext_resource type="PackedScene" uid="uid://cik30de5gaaah" path="res://scenes/ingame_scene.tscn" id="2_lch8g"]
[node name="Tutorial" type="Node2D"]
script = ExtResource("1_i8rpu")
next_scene = ExtResource("2_lch8g")
[node name="AspectRatioContainer" type="AspectRatioContainer" parent="."]
offset_right = 576.0
offset_bottom = 325.0
ratio = 1.6306
[node name="VSplitContainer" type="VSplitContainer" parent="AspectRatioContainer"]
layout_mode = 2
split_offset = 270
dragger_visibility = 2
[node name="RichTextLabel" type="RichTextLabel" parent="AspectRatioContainer/VSplitContainer"]
layout_mode = 2
text = "Can YOU please the crowd?
Throw out jokes but be aware that not every joke is for everyone.
Can you please everyone before you run out of breath?"
[node name="CenterContainer" type="CenterContainer" parent="AspectRatioContainer/VSplitContainer"]
layout_mode = 2
[node name="Button" type="Button" parent="AspectRatioContainer/VSplitContainer/CenterContainer"]
layout_mode = 2
text = "I'm ready for the show!"
[connection signal="pressed" from="AspectRatioContainer/VSplitContainer/CenterContainer/Button" to="." method="_on_button_pressed"]