final tutorial setup and UI fix
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 6m9s

This commit is contained in:
2025-11-06 09:29:05 +01:00
parent 29d9f44142
commit 1ea3945cf6
5 changed files with 163 additions and 38 deletions

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=37 format=3 uid="uid://dmkw8cmalm5k"] [gd_scene load_steps=42 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"]
@@ -23,6 +23,7 @@
[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"]
[ext_resource type="Texture2D" uid="uid://nrhxjdpuje3f" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_lt_outline.svg" id="20_crf87"] [ext_resource type="Texture2D" uid="uid://nrhxjdpuje3f" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_lt_outline.svg" id="20_crf87"]
[ext_resource type="Texture2D" uid="uid://bfkj4neu0m0rm" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_rt_outline.svg" id="21_rmfv1"] [ext_resource type="Texture2D" uid="uid://bfkj4neu0m0rm" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_rt_outline.svg" id="21_rmfv1"]
[ext_resource type="Texture2D" uid="uid://dyjvbsvbriii4" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_rb_outline.svg" id="23_p287n"]
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_feb1n"] [sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_feb1n"]
panorama = ExtResource("2_ruo5i") panorama = ExtResource("2_ruo5i")
@@ -70,6 +71,18 @@ size = Vector3(12, 11.5, 5)
[sub_resource type="BoxShape3D" id="BoxShape3D_nrosh"] [sub_resource type="BoxShape3D" id="BoxShape3D_nrosh"]
size = Vector3(8, 16.5, 25.5) size = Vector3(8, 16.5, 25.5)
[sub_resource type="BoxShape3D" id="BoxShape3D_lnjrw"]
size = Vector3(14, 15.5, 13.5)
[sub_resource type="BoxShape3D" id="BoxShape3D_lgco8"]
size = Vector3(12, 14.5, 11)
[sub_resource type="BoxShape3D" id="BoxShape3D_51ivn"]
size = Vector3(12, 14.5, 11)
[sub_resource type="BoxShape3D" id="BoxShape3D_3w3wd"]
size = Vector3(13, 16.5, 11.5)
[sub_resource type="BoxShape3D" id="BoxShape3D_lu3yt"] [sub_resource type="BoxShape3D" id="BoxShape3D_lu3yt"]
size = Vector3(11.5, 9, 4.5) size = Vector3(11.5, 9, 4.5)
@@ -206,6 +219,42 @@ collision_mask = 16
transform = Transform3D(0.9961947, 0, -0.08715595, 0, 1, 0, 0.08715595, 0, 0.9961947, 1.0587616, 7.5, 5.1117268) transform = Transform3D(0.9961947, 0, -0.08715595, 0, 1, 0, 0.08715595, 0, 0.9961947, 1.0587616, 7.5, 5.1117268)
shape = SubResource("BoxShape3D_nrosh") shape = SubResource("BoxShape3D_nrosh")
[node name="TriggerTutoWeaponThrow" type="Area3D" parent="TutoTriggers"]
transform = Transform3D(0.9961947, 0, -0.087155744, 0, 1, 0, 0.087155744, 0, 0.9961947, 4.428787, 58, 19.770819)
collision_layer = 0
collision_mask = 16
[node name="CollisionShape3D" type="CollisionShape3D" parent="TutoTriggers/TriggerTutoWeaponThrow"]
transform = Transform3D(0.9961947, 0, -0.08715595, 0, 1, 0, 0.08715595, 0, 0.9961947, 4.4208603, 7, -4.632329)
shape = SubResource("BoxShape3D_lnjrw")
[node name="TriggerTutoEmpoweredDash" type="Area3D" parent="TutoTriggers"]
transform = Transform3D(0.9961947, 0, -0.087155744, 0, 1, 0, 0.087155744, 0, 0.9961947, -25.417572, 58, 16.138357)
collision_layer = 0
collision_mask = 16
[node name="CollisionShape3D" type="CollisionShape3D" parent="TutoTriggers/TriggerTutoEmpoweredDash"]
transform = Transform3D(0.9961947, 0, -0.08715595, 0, 1, 0, 0.08715595, 0, 0.9961947, 3.4464645, 6.5, -4.9685373)
shape = SubResource("BoxShape3D_lgco8")
[node name="TriggerTutoEmpoweredJump" type="Area3D" parent="TutoTriggers"]
transform = Transform3D(0.9961947, 0, -0.087155744, 0, 1, 0, 0.087155744, 0, 0.9961947, -59.648212, 58, 10.263556)
collision_layer = 0
collision_mask = 16
[node name="CollisionShape3D" type="CollisionShape3D" parent="TutoTriggers/TriggerTutoEmpoweredJump"]
transform = Transform3D(0.9961947, 0, -0.08715595, 0, 1, 0, 0.08715595, 0, 0.9961947, 3.4464645, 6.5, -4.9685373)
shape = SubResource("BoxShape3D_51ivn")
[node name="TriggerTutoEnjoy" type="Area3D" parent="TutoTriggers"]
transform = Transform3D(0.9961947, 0, -0.087155744, 0, 1, 0, 0.087155744, 0, 0.9961947, -120.81145, 214.5, 2.417603)
collision_layer = 0
collision_mask = 16
[node name="CollisionShape3D" type="CollisionShape3D" parent="TutoTriggers/TriggerTutoEnjoy"]
transform = Transform3D(0.9961947, 0, -0.08715595, 0, 1, 0, 0.08715595, 0, 0.9961947, 3.9663503, 5.5, -5.174009)
shape = SubResource("BoxShape3D_3w3wd")
[node name="TutorialDoneArea" type="Area3D" parent="TutoTriggers"] [node name="TutorialDoneArea" type="Area3D" parent="TutoTriggers"]
transform = Transform3D(0.14133324, 0, 0.98996216, 0, 1, 0, -0.98996216, 0, 0.14133324, 7.9436035, 53.74933, 16.672102) transform = Transform3D(0.14133324, 0, 0.98996216, 0, 1, 0, -0.98996216, 0, 0.14133324, 7.9436035, 53.74933, 16.672102)
collision_layer = 0 collision_layer = 0
@@ -402,6 +451,30 @@ layout_mode = 2
text = "Dash towards sword" text = "Dash towards sword"
label_settings = SubResource("LabelSettings_2k3fr") label_settings = SubResource("LabelSettings_2k3fr")
[node name="TutoWeaponThrow" type="HBoxContainer" parent="TutorialController/PanelContainer/MarginContainer"]
unique_name_in_owner = true
visible = false
layout_mode = 2
theme_override_constants/separation = 20
[node name="HBoxContainer" type="HBoxContainer" parent="TutorialController/PanelContainer/MarginContainer/TutoWeaponThrow"]
layout_mode = 2
theme_override_constants/separation = 0
[node name="TextureRect" type="TextureRect" parent="TutorialController/PanelContainer/MarginContainer/TutoWeaponThrow/HBoxContainer"]
layout_mode = 2
texture = ExtResource("23_p287n")
[node name="Label2" type="Label" parent="TutorialController/PanelContainer/MarginContainer/TutoWeaponThrow/HBoxContainer"]
layout_mode = 2
text = "while aiming"
label_settings = SubResource("LabelSettings_2k3fr")
[node name="Label3" type="Label" parent="TutorialController/PanelContainer/MarginContainer/TutoWeaponThrow"]
layout_mode = 2
text = "Throw weapon"
label_settings = SubResource("LabelSettings_2k3fr")
[node name="TutoEmpoweredDash" type="HBoxContainer" parent="TutorialController/PanelContainer/MarginContainer"] [node name="TutoEmpoweredDash" type="HBoxContainer" parent="TutorialController/PanelContainer/MarginContainer"]
unique_name_in_owner = true unique_name_in_owner = true
visible = false visible = false
@@ -458,6 +531,17 @@ layout_mode = 2
text = "Empowered jump" text = "Empowered jump"
label_settings = SubResource("LabelSettings_2k3fr") label_settings = SubResource("LabelSettings_2k3fr")
[node name="TutoEnjoy" type="HBoxContainer" parent="TutorialController/PanelContainer/MarginContainer"]
unique_name_in_owner = true
visible = false
layout_mode = 2
theme_override_constants/separation = 15
[node name="label" type="Label" parent="TutorialController/PanelContainer/MarginContainer/TutoEnjoy"]
layout_mode = 2
text = "Enjoy this little playground!"
label_settings = SubResource("LabelSettings_2k3fr")
[connection signal="body_exited" from="TutoTriggers/TriggerTutoMove" to="TutorialController" method="hide_tutorials"] [connection signal="body_exited" from="TutoTriggers/TriggerTutoMove" to="TutorialController" method="hide_tutorials"]
[connection signal="body_entered" from="TutoTriggers/TriggerTutoMantle" to="TutorialController" method="_on_tuto_mantle_body_entered"] [connection signal="body_entered" from="TutoTriggers/TriggerTutoMantle" to="TutorialController" method="_on_tuto_mantle_body_entered"]
[connection signal="body_exited" from="TutoTriggers/TriggerTutoMantle" to="TutorialController" method="hide_tutorials"] [connection signal="body_exited" from="TutoTriggers/TriggerTutoMantle" to="TutorialController" method="hide_tutorials"]
@@ -471,6 +555,14 @@ label_settings = SubResource("LabelSettings_2k3fr")
[connection signal="body_exited" from="TutoTriggers/TriggerTutoWallJump2" to="TutorialController" method="hide_tutorials"] [connection signal="body_exited" from="TutoTriggers/TriggerTutoWallJump2" to="TutorialController" method="hide_tutorials"]
[connection signal="body_entered" from="TutoTriggers/TriggerTutoDash" to="TutorialController" method="_on_tuto_dash_body_entered"] [connection signal="body_entered" from="TutoTriggers/TriggerTutoDash" to="TutorialController" method="_on_tuto_dash_body_entered"]
[connection signal="body_exited" from="TutoTriggers/TriggerTutoDash" to="TutorialController" method="hide_tutorials"] [connection signal="body_exited" from="TutoTriggers/TriggerTutoDash" to="TutorialController" method="hide_tutorials"]
[connection signal="body_entered" from="TutoTriggers/TriggerTutoWeaponThrow" to="TutorialController" method="_on_tuto_weapon_throw_body_entered"]
[connection signal="body_exited" from="TutoTriggers/TriggerTutoWeaponThrow" to="TutorialController" method="hide_tutorials"]
[connection signal="body_entered" from="TutoTriggers/TriggerTutoEmpoweredDash" to="TutorialController" method="_on_tuto_empowered_dash_body_entered"]
[connection signal="body_exited" from="TutoTriggers/TriggerTutoEmpoweredDash" to="TutorialController" method="hide_tutorials"]
[connection signal="body_entered" from="TutoTriggers/TriggerTutoEmpoweredJump" to="TutorialController" method="_on_tuto_empowered_jump_body_entered"]
[connection signal="body_exited" from="TutoTriggers/TriggerTutoEmpoweredJump" to="TutorialController" method="hide_tutorials"]
[connection signal="body_entered" from="TutoTriggers/TriggerTutoEnjoy" to="TutorialController" method="_on_tuto_enjoy_body_entered"]
[connection signal="body_exited" from="TutoTriggers/TriggerTutoEnjoy" to="TutorialController" method="hide_tutorials"]
[connection signal="body_entered" from="TutoTriggers/TutorialDoneArea" to="Player" method="OnTutorialDone"] [connection signal="body_entered" from="TutoTriggers/TutorialDoneArea" to="Player" method="OnTutorialDone"]
[connection signal="body_entered" from="TutoTriggers/TutorialDoneArea" to="TutorialController" method="_on_tuto_done_area_body_entered"] [connection signal="body_entered" from="TutoTriggers/TutorialDoneArea" to="TutorialController" method="_on_tuto_done_area_body_entered"]
[connection signal="body_exited" from="TutoTriggers/TutorialDoneArea" to="TutorialController" method="hide_tutorials"] [connection signal="body_exited" from="TutoTriggers/TutorialDoneArea" to="TutorialController" method="hide_tutorials"]

View File

@@ -223,44 +223,47 @@ initial_node_to_watch = NodePath("../StateChart")
[node name="UI" type="CanvasLayer" parent="."] [node name="UI" type="CanvasLayer" parent="."]
script = ExtResource("30_2ghaa") script = ExtResource("30_2ghaa")
[node name="VBoxContainer" type="VBoxContainer" parent="UI"] [node name="MarginContainer" type="MarginContainer" parent="UI"]
offset_right = 128.0
offset_bottom = 81.0
[node name="DashesLabel" type="Label" parent="UI/VBoxContainer"]
layout_mode = 2
text = "Dashes"
[node name="HBoxContainer" type="HBoxContainer" parent="UI/VBoxContainer"]
custom_minimum_size = Vector2(0, 30)
layout_mode = 2
[node name="Dash1" type="TextureRect" parent="UI/VBoxContainer/HBoxContainer"]
layout_mode = 2
texture = ExtResource("30_h23go")
expand_mode = 2
[node name="Dash2" type="TextureRect" parent="UI/VBoxContainer/HBoxContainer"]
layout_mode = 2
texture = ExtResource("30_h23go")
expand_mode = 2
[node name="Dash3" type="TextureRect" parent="UI/VBoxContainer/HBoxContainer"]
layout_mode = 2
texture = ExtResource("30_h23go")
expand_mode = 2
[node name="DashCooldownIndicator" type="ColorRect" parent="UI"]
unique_name_in_owner = true
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
offset_left = 910.0
offset_top = 549.0
offset_right = -910.0
offset_bottom = -521.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
theme_override_constants/margin_left = 50
theme_override_constants/margin_top = 50
theme_override_constants/margin_right = 50
theme_override_constants/margin_bottom = 50
[node name="VBoxContainer" type="VBoxContainer" parent="UI/MarginContainer"]
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 0
[node name="DashesLabel" type="Label" parent="UI/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Dashes"
[node name="HBoxContainer" type="HBoxContainer" parent="UI/MarginContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 30)
layout_mode = 2
[node name="Dash1" type="TextureRect" parent="UI/MarginContainer/VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
texture = ExtResource("30_h23go")
expand_mode = 2
[node name="Dash2" type="TextureRect" parent="UI/MarginContainer/VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
texture = ExtResource("30_h23go")
expand_mode = 2
[node name="Dash3" type="TextureRect" parent="UI/MarginContainer/VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
texture = ExtResource("30_h23go")
expand_mode = 2
[node name="CenterContainer" type="CenterContainer" parent="UI"] [node name="CenterContainer" type="CenterContainer" parent="UI"]
custom_minimum_size = Vector2(1920, 1080) custom_minimum_size = Vector2(1920, 1080)
@@ -278,6 +281,22 @@ layout_mode = 2
texture = ExtResource("32_lgpc8") texture = ExtResource("32_lgpc8")
expand_mode = 1 expand_mode = 1
[node name="CenterContainer2" type="CenterContainer" parent="UI"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="MarginContainer" type="MarginContainer" parent="UI/CenterContainer2"]
layout_mode = 2
theme_override_constants/margin_top = 50
[node name="DashCooldownIndicator" type="ColorRect" parent="UI/CenterContainer2/MarginContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(100, 10)
layout_mode = 2
[node name="StateChart" type="Node" parent="."] [node name="StateChart" type="Node" parent="."]
script = ExtResource("25_wv70j") script = ExtResource("25_wv70j")
metadata/_custom_type_script = "uid://couw105c3bde4" metadata/_custom_type_script = "uid://couw105c3bde4"

View File

@@ -9,9 +9,9 @@ public partial class PlayerUi : CanvasLayer
{ {
base._Ready(); base._Ready();
_dashIcons[0] = GetNode<TextureRect>("VBoxContainer/HBoxContainer/Dash1"); _dashIcons[0] = GetNode<TextureRect>("%Dash1");
_dashIcons[1] = GetNode<TextureRect>("VBoxContainer/HBoxContainer/Dash2"); _dashIcons[1] = GetNode<TextureRect>("%Dash2");
_dashIcons[2] = GetNode<TextureRect>("VBoxContainer/HBoxContainer/Dash3"); _dashIcons[2] = GetNode<TextureRect>("%Dash3");
} }
public void SetNumberOfDashesLeft(int numberOfDashes) public void SetNumberOfDashesLeft(int numberOfDashes)

View File

@@ -601,7 +601,7 @@ public partial class PlayerController : CharacterBody3D
public void PowerRecharging(float delta) public void PowerRecharging(float delta)
{ {
var progress = (float) (_powerCooldownTimer.TimeLeft / _powerCooldownTimer.WaitTime); var progress = (float) (_powerCooldownTimer.TimeLeft / _powerCooldownTimer.WaitTime);
PowerCooldownIndicator.SetSize(new Vector2(100 * progress, 10)); PowerCooldownIndicator.SetCustomMinimumSize(new Vector2(100 * progress, 10));
} }
public void StartPowerCooldown() public void StartPowerCooldown()
{ {

View File

@@ -15,8 +15,10 @@ var active_tutorial: Control
@onready var tuto_wall_jump: HBoxContainer = %TutoWallJump @onready var tuto_wall_jump: HBoxContainer = %TutoWallJump
@onready var tuto_dash: HBoxContainer = %TutoDash @onready var tuto_dash: HBoxContainer = %TutoDash
@onready var tuto_dash_weapon: HBoxContainer = %TutoDashWeapon @onready var tuto_dash_weapon: HBoxContainer = %TutoDashWeapon
@onready var tuto_weapon_throw: HBoxContainer = %TutoWeaponThrow
@onready var tuto_empowered_dash: HBoxContainer = %TutoEmpoweredDash @onready var tuto_empowered_dash: HBoxContainer = %TutoEmpoweredDash
@onready var tuto_empowered_jump: HBoxContainer = %TutoEmpoweredJump @onready var tuto_empowered_jump: HBoxContainer = %TutoEmpoweredJump
@onready var tuto_enjoy: HBoxContainer = %TutoEnjoy
func _ready() -> void: func _ready() -> void:
@@ -55,6 +57,18 @@ func _on_tuto_done_area_body_entered(body: Node3D) -> void:
func _on_weapon_retrieved_body_entered(body: Node3D) -> void: func _on_weapon_retrieved_body_entered(body: Node3D) -> void:
wait_to_show_blocking_tuto.start() wait_to_show_blocking_tuto.start()
func _on_tuto_weapon_throw_body_entered(body: Node3D) -> void:
handle_new_tutorial(tuto_weapon_throw)
func _on_tuto_empowered_dash_body_entered(body: Node3D) -> void:
handle_new_tutorial(tuto_empowered_dash)
func _on_tuto_empowered_jump_body_entered(body: Node3D) -> void:
handle_new_tutorial(tuto_empowered_jump)
func _on_tuto_enjoy_body_entered(body: Node3D) -> void:
handle_new_tutorial(tuto_enjoy)
func _show_weapon_tutorial() -> void: func _show_weapon_tutorial() -> void:
if already_shown_weapon_tuto: if already_shown_weapon_tuto:
return return