made a dedicated scene for simple on-screen tutorials
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 18s
Create tag and build when new code gets to main / Export (push) Successful in 6m11s

This commit is contained in:
2025-11-08 10:56:35 +01:00
parent 1ea3945cf6
commit c895dfe9a0
4 changed files with 123 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=42 format=3 uid="uid://dmkw8cmalm5k"] [gd_scene load_steps=44 format=3 uid="uid://dmkw8cmalm5k"]
[ext_resource type="PackedScene" uid="uid://bei4nhkf8lwdo" path="res://player_controller/PlayerController.tscn" id="1_2vsi6"] [ext_resource type="PackedScene" uid="uid://bei4nhkf8lwdo" path="res://player_controller/PlayerController.tscn" id="1_2vsi6"]
[ext_resource type="Texture2D" uid="uid://ca4kkq3w8cd4n" path="res://assets/sky/sky_15_2k.png" id="2_ruo5i"] [ext_resource type="Texture2D" uid="uid://ca4kkq3w8cd4n" path="res://assets/sky/sky_15_2k.png" id="2_ruo5i"]
@@ -18,6 +18,7 @@
[ext_resource type="Texture2D" uid="uid://dl73t0kxkaxp0" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_button_a_outline.svg" id="16_2k3fr"] [ext_resource type="Texture2D" uid="uid://dl73t0kxkaxp0" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_button_a_outline.svg" id="16_2k3fr"]
[ext_resource type="Texture2D" uid="uid://blfc13splpcld" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_stick_l.svg" id="16_crf87"] [ext_resource type="Texture2D" uid="uid://blfc13splpcld" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_stick_l.svg" id="16_crf87"]
[ext_resource type="Script" uid="uid://dvieq1o7ci70y" path="res://systems/ui/tutorial_controller.gd" id="16_efsse"] [ext_resource type="Script" uid="uid://dvieq1o7ci70y" path="res://systems/ui/tutorial_controller.gd" id="16_efsse"]
[ext_resource type="PackedScene" uid="uid://b8aet6m4m2i83" path="res://scenes/tuto_trigger/TutoTrigger.tscn" id="16_qwuk2"]
[ext_resource type="Texture2D" uid="uid://com0lpfuol6vk" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_stick_r.svg" id="17_rmfv1"] [ext_resource type="Texture2D" uid="uid://com0lpfuol6vk" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_stick_r.svg" id="17_rmfv1"]
[ext_resource type="PackedScene" uid="uid://kktuyhbd5xgc" path="res://menus/scenes/overlaid_menus/tuto_got_sword.tscn" id="17_t0d86"] [ext_resource type="PackedScene" uid="uid://kktuyhbd5xgc" path="res://menus/scenes/overlaid_menus/tuto_got_sword.tscn" id="17_t0d86"]
[ext_resource type="Texture2D" uid="uid://cjh5cnvdbq5ku" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_button_b_outline.svg" id="19_efsse"] [ext_resource type="Texture2D" uid="uid://cjh5cnvdbq5ku" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_button_b_outline.svg" id="19_efsse"]
@@ -89,6 +90,9 @@ size = Vector3(11.5, 9, 4.5)
[sub_resource type="BoxShape3D" id="BoxShape3D_pxspk"] [sub_resource type="BoxShape3D" id="BoxShape3D_pxspk"]
size = Vector3(11.5, 9, 4.5) size = Vector3(11.5, 9, 4.5)
[sub_resource type="BoxShape3D" id="BoxShape3D_5hbxb"]
size = Vector3(9.5, 2, 5.5)
[sub_resource type="LabelSettings" id="LabelSettings_2k3fr"] [sub_resource type="LabelSettings" id="LabelSettings_2k3fr"]
font_size = 30 font_size = 30
@@ -273,6 +277,16 @@ collision_mask = 16
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.7500105, 4, 0.7499695) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.7500105, 4, 0.7499695)
shape = SubResource("BoxShape3D_pxspk") shape = SubResource("BoxShape3D_pxspk")
[node name="TutoTrigger" parent="TutoTriggers" instance=ExtResource("16_qwuk2")]
transform = Transform3D(0.054514553, 0, 0.99851304, 0, 1, 0, -0.99851304, 0, 0.054514553, -9.365448, -0.7506714, -14.818321)
first_input_texture = ExtResource("16_2k3fr")
complex_input_text = "while on wall"
tuto_text = "Jump"
[node name="CollisionShape3D" type="CollisionShape3D" parent="TutoTriggers/TutoTrigger"]
transform = Transform3D(0.9848077, 0, -0.17364818, 0, 1, 0, 0.17364818, 0, 0.9848077, 1.8592949, 0.5, 2.2158203)
shape = SubResource("BoxShape3D_5hbxb")
[node name="TutorialController" type="Control" parent="."] [node name="TutorialController" type="Control" parent="."]
layout_mode = 3 layout_mode = 3
anchors_preset = 15 anchors_preset = 15

View File

@@ -0,0 +1,70 @@
[gd_scene load_steps=4 format=3 uid="uid://b8aet6m4m2i83"]
[ext_resource type="Script" uid="uid://bnqhh6b5iusam" path="res://scenes/tuto_trigger/tuto_trigger.gd" id="1_w8mpv"]
[sub_resource type="LabelSettings" id="LabelSettings_4vbx1"]
font_size = 30
[sub_resource type="LabelSettings" id="LabelSettings_g04tr"]
font_size = 30
[node name="TutoTrigger" type="Area3D"]
collision_layer = 0
collision_mask = 16
script = ExtResource("1_w8mpv")
[node name="Control" type="Control" parent="."]
visible = false
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="PanelContainer" type="PanelContainer" parent="Control"]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_top = 0.7
anchor_right = 0.5
anchor_bottom = 0.7
grow_horizontal = 2
grow_vertical = 2
[node name="MarginContainer" type="MarginContainer" parent="Control/PanelContainer"]
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="HBoxContainer" type="HBoxContainer" parent="Control/PanelContainer/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 20
[node name="MultipleInputsContainer" type="HBoxContainer" parent="Control/PanelContainer/MarginContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_override_constants/separation = 0
[node name="FirstInput" type="TextureRect" parent="Control/PanelContainer/MarginContainer/HBoxContainer/MultipleInputsContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="ComplexInputLabel" type="Label" parent="Control/PanelContainer/MarginContainer/HBoxContainer/MultipleInputsContainer"]
unique_name_in_owner = true
layout_mode = 2
label_settings = SubResource("LabelSettings_4vbx1")
[node name="SecondInput" type="TextureRect" parent="Control/PanelContainer/MarginContainer/HBoxContainer/MultipleInputsContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="TutoText" type="Label" parent="Control/PanelContainer/MarginContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
label_settings = SubResource("LabelSettings_g04tr")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="body_exited" from="." to="." method="_on_body_exited"]

View File

@@ -0,0 +1,37 @@
extends Area3D
@onready var control: Control = $Control
@onready var multiple_inputs_container: HBoxContainer = %MultipleInputsContainer
@onready var first_input: TextureRect = %FirstInput
@onready var complex_input_label: Label = %ComplexInputLabel
@onready var second_input: TextureRect = %SecondInput
@onready var tuto_label: Label = %TutoText
@export var first_input_texture: CompressedTexture2D
@export var second_input_texture: CompressedTexture2D
@export var complex_input_text: String
@export var tuto_text: String
func _ready() -> void:
tuto_label.text = tuto_text
first_input.texture = first_input_texture
second_input.texture = second_input_texture
complex_input_label.text = complex_input_text
if second_input_texture != null:
complex_input_label.text = "+"
if second_input_texture == null and complex_input_text.is_empty():
complex_input_label.visible = false
second_input.visible = false
func _on_body_entered(body: Node3D) -> void:
control.visible = true
func _on_body_exited(body: Node3D) -> void:
control.visible = false

View File

@@ -0,0 +1 @@
uid://bnqhh6b5iusam