Added victory screen
This commit is contained in:
parent
02edf033fe
commit
d34ecc35e4
5 changed files with 78 additions and 1 deletions
|
|
@ -114,6 +114,8 @@ func die():
|
|||
child.queue_free()
|
||||
$DeathSound.play()
|
||||
await $DeathSound.finished
|
||||
await get_tree().create_timer(3).timeout
|
||||
get_tree().change_scene_to_file("res://ui/victory_screen/victory_screen.tscn")
|
||||
queue_free()
|
||||
|
||||
func _on_enemy_hurtbox_damage_taken(_damage, _dir) -> void:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
[ext_resource type="Texture2D" uid="uid://q5mu3lxlsd6f" path="res://enemies/boss/boss2.png" id="3_opohk"]
|
||||
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="4_lnbgr"]
|
||||
[ext_resource type="AudioStream" uid="uid://co07360hqn6fk" path="res://sounds/686321__cjspellsfish__punch-land-soft.wav" id="6_opohk"]
|
||||
[ext_resource type="AudioStream" uid="uid://c54uipjpvhal7" path="res://sounds/751710__el_boss__tree-hit-skier-tree-impact-variation-2-of-3.wav" id="7_auiwu"]
|
||||
[ext_resource type="AudioStream" uid="uid://ngkksuy3438s" path="res://sounds/slime-impact-352473.mp3" id="7_auiwu"]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_lnbgr"]
|
||||
|
|
@ -64,6 +63,7 @@ volume_db = 15.0
|
|||
[node name="SoundSlam" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource("7_auiwu")
|
||||
volume_db = 12.0
|
||||
|
||||
[node name="DeathSound" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource("7_auiwu")
|
||||
volume_db = 10.0
|
||||
|
|
|
|||
68
ui/victory_screen/victory_screen.tscn
Normal file
68
ui/victory_screen/victory_screen.tscn
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://uyr7i3p0gq87"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://dwlus1hjwtch4" path="res://large_theme.tres" id="1_w5gup"]
|
||||
[ext_resource type="Script" uid="uid://cnyqct7s7m4th" path="res://ui/victory_screen/victory_screen_button_main_menu.gd" id="2_axvl8"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_axvl8"]
|
||||
bg_color = Color(0.25, 0.025000006, 0.025000006, 1)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
|
||||
[node name="VictoryScreen" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="ColorRect"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -20.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="ColorRect/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(1000, 100)
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_w5gup")
|
||||
theme_override_colors/default_color = Color(1, 1, 1, 1)
|
||||
text = "Congratulations!"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Spacer" type="Control" parent="ColorRect/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 200)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="PanelContainer2" type="PanelContainer" parent="ColorRect/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_axvl8")
|
||||
|
||||
[node name="Button_Main_Menu" type="Button" parent="ColorRect/VBoxContainer/PanelContainer2"]
|
||||
custom_minimum_size = Vector2(400, 100)
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"FlatButton"
|
||||
text = "Main Menu"
|
||||
script = ExtResource("2_axvl8")
|
||||
|
||||
[connection signal="pressed" from="ColorRect/VBoxContainer/PanelContainer2/Button_Main_Menu" to="ColorRect/VBoxContainer/PanelContainer2/Button_Main_Menu" method="_on_pressed"]
|
||||
6
ui/victory_screen/victory_screen_button_main_menu.gd
Normal file
6
ui/victory_screen/victory_screen_button_main_menu.gd
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
extends Button
|
||||
|
||||
|
||||
|
||||
func _on_pressed() -> void:
|
||||
get_tree().change_scene_to_file("res://ui/main_menu/main_menu.tscn")
|
||||
1
ui/victory_screen/victory_screen_button_main_menu.gd.uid
Normal file
1
ui/victory_screen/victory_screen_button_main_menu.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cnyqct7s7m4th
|
||||
Loading…
Add table
Reference in a new issue