Merged with main and fixed merge conflicts

This commit is contained in:
VoidTwo
2021-11-29 13:22:17 -06:00
161 changed files with 2958 additions and 576 deletions

75
GUI/HUD.gd Normal file
View File

@@ -0,0 +1,75 @@
extends CanvasLayer
signal add_currency(amount)
func _on_Add_Currency_pressed() -> void:
emit_signal('add_currency', 1)
return
func update_currency(amount: int) -> void:
$Currency.set_text(String(amount))
return
func update_health(value: int) -> void:
$'Health Bar'.value = value
return
func _on_weapon_slot_pressed() -> void:
$'Weapon Selection'.set_visible(not $'Weapon Selection'.visible)
return
func _on_select_bow_pressed() -> void:
$'Weapon Selection/Bow'.set_visible(false)
$'Equipped Weapon/Weapon'.set_normal_texture(
$'Weapon Selection/Bow/Weapon'.get_normal_texture())
$'Weapon Selection/Javelin'.set_visible(true)
$'Weapon Selection/Staff'.set_visible(true)
$'Weapon Selection/Sword'.set_visible(true)
$'Weapon Selection'.set_visible(false)
return
func _on_select_javelin_pressed() -> void:
$'Weapon Selection/Javelin'.set_visible(false)
$'Equipped Weapon/Weapon'.set_normal_texture(
$'Weapon Selection/Javelin/Weapon'.get_normal_texture())
$'Weapon Selection/Bow'.set_visible(true)
$'Weapon Selection/Staff'.set_visible(true)
$'Weapon Selection/Sword'.set_visible(true)
$'Weapon Selection'.set_visible(false)
return
func _on_select_staff_pressed() -> void:
$'Weapon Selection/Staff'.set_visible(false)
$'Equipped Weapon/Weapon'.set_normal_texture(
$'Weapon Selection/Staff/Weapon'.get_normal_texture())
$'Weapon Selection/Bow'.set_visible(true)
$'Weapon Selection/Javelin'.set_visible(true)
$'Weapon Selection/Sword'.set_visible(true)
$'Weapon Selection'.set_visible(false)
return
func _on_select_sword_pressed() -> void:
$'Weapon Selection/Sword'.set_visible(false)
$'Equipped Weapon/Weapon'.set_normal_texture(
$'Weapon Selection/Sword/Weapon'.get_normal_texture())
$'Weapon Selection/Bow'.set_visible(true)
$'Weapon Selection/Javelin'.set_visible(true)
$'Weapon Selection/Staff'.set_visible(true)
$'Weapon Selection'.set_visible(false)
return

182
GUI/HUD.tscn Normal file
View File

@@ -0,0 +1,182 @@
[gd_scene load_steps=12 format=2]
[ext_resource path="res://GUI/HUD.gd" type="Script" id=1]
[ext_resource path="res://Sprites/HUD/Health_Bar_Under.png" type="Texture" id=2]
[ext_resource path="res://Sprites/HUD/Health_Bar_Progress.png" type="Texture" id=3]
[ext_resource path="res://Sprites/HUD/Health_Bar_Over.png" type="Texture" id=4]
[ext_resource path="res://Sprites/Items/Staff.png" type="Texture" id=5]
[ext_resource path="res://Sprites/Items/Sword.png" type="Texture" id=6]
[ext_resource path="res://Sprites/HUD/HUD_Weapon_Slot.png" type="Texture" id=7]
[ext_resource path="res://Sprites/Items/Bow.png" type="Texture" id=8]
[ext_resource path="res://Sprites/Items/Javelin.png" type="Texture" id=9]
[ext_resource path="res://Fonts/TheLittleBonjour.ttf" type="DynamicFontData" id=10]
[sub_resource type="DynamicFont" id=1]
size = 40
font_data = ExtResource( 10 )
[node name="HUD" type="CanvasLayer"]
script = ExtResource( 1 )
[node name="Health Bar" type="TextureProgress" parent="."]
margin_left = 1.0
margin_top = 1.0
margin_right = 105.0
margin_bottom = 19.0
rect_min_size = Vector2( 104, 18 )
rect_scale = Vector2( 0.75, 0.75 )
texture_under = ExtResource( 2 )
texture_over = ExtResource( 4 )
texture_progress = ExtResource( 3 )
tint_progress = Color( 0.431373, 1, 0.737255, 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Currency" type="Label" parent="."]
margin_left = 218.0
margin_top = 2.0
margin_right = 618.0
margin_bottom = 52.0
rect_min_size = Vector2( 400, 50 )
rect_scale = Vector2( 0.25, 0.25 )
custom_fonts/font = SubResource( 1 )
align = 2
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Add Currency" type="Button" parent="."]
visible = false
margin_left = 300.0
margin_top = 20.0
margin_right = 320.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Equipped Weapon" type="CenterContainer" parent="."]
margin_left = 275.0
margin_top = 135.0
margin_right = 315.0
margin_bottom = 175.0
rect_min_size = Vector2( 40, 40 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Slot Background" type="TextureRect" parent="Equipped Weapon"]
margin_right = 40.0
margin_bottom = 40.0
texture = ExtResource( 7 )
[node name="Weapon" type="TextureButton" parent="Equipped Weapon"]
margin_left = 7.0
margin_top = 7.0
margin_right = 32.0
margin_bottom = 32.0
rect_min_size = Vector2( 25, 25 )
texture_normal = ExtResource( 6 )
expand = true
[node name="Weapon Selection" type="HBoxContainer" parent="."]
visible = false
margin_left = 230.0
margin_top = 135.0
margin_right = 270.0
margin_bottom = 175.0
grow_horizontal = 0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Bow" type="CenterContainer" parent="Weapon Selection"]
margin_right = 40.0
margin_bottom = 40.0
rect_min_size = Vector2( 40, 40 )
[node name="Slot Background" type="TextureRect" parent="Weapon Selection/Bow"]
margin_right = 40.0
margin_bottom = 40.0
texture = ExtResource( 7 )
[node name="Weapon" type="TextureButton" parent="Weapon Selection/Bow"]
margin_left = 7.0
margin_top = 7.0
margin_right = 32.0
margin_bottom = 32.0
rect_min_size = Vector2( 25, 25 )
texture_normal = ExtResource( 8 )
expand = true
[node name="Javelin" type="CenterContainer" parent="Weapon Selection"]
margin_left = 44.0
margin_right = 84.0
margin_bottom = 40.0
rect_min_size = Vector2( 40, 40 )
[node name="Slot Background" type="TextureRect" parent="Weapon Selection/Javelin"]
margin_right = 40.0
margin_bottom = 40.0
texture = ExtResource( 7 )
[node name="Weapon" type="TextureButton" parent="Weapon Selection/Javelin"]
margin_left = 7.0
margin_top = 7.0
margin_right = 32.0
margin_bottom = 32.0
rect_min_size = Vector2( 25, 25 )
texture_normal = ExtResource( 9 )
expand = true
[node name="Staff" type="CenterContainer" parent="Weapon Selection"]
margin_left = 88.0
margin_right = 128.0
margin_bottom = 40.0
rect_min_size = Vector2( 40, 40 )
[node name="Slot Background" type="TextureRect" parent="Weapon Selection/Staff"]
margin_right = 40.0
margin_bottom = 40.0
texture = ExtResource( 7 )
[node name="Weapon" type="TextureButton" parent="Weapon Selection/Staff"]
margin_left = 7.0
margin_top = 7.0
margin_right = 32.0
margin_bottom = 32.0
rect_min_size = Vector2( 25, 25 )
texture_normal = ExtResource( 5 )
expand = true
[node name="Sword" type="CenterContainer" parent="Weapon Selection"]
visible = false
margin_left = 132.0
margin_right = 172.0
margin_bottom = 40.0
rect_min_size = Vector2( 40, 40 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Slot Background" type="TextureRect" parent="Weapon Selection/Sword"]
margin_right = 40.0
margin_bottom = 40.0
texture = ExtResource( 7 )
[node name="Weapon" type="TextureButton" parent="Weapon Selection/Sword"]
margin_left = 7.0
margin_top = 7.0
margin_right = 32.0
margin_bottom = 32.0
rect_min_size = Vector2( 25, 25 )
texture_normal = ExtResource( 6 )
expand = true
[connection signal="pressed" from="Add Currency" to="." method="_on_Add_Currency_pressed"]
[connection signal="pressed" from="Equipped Weapon/Weapon" to="." method="_on_weapon_slot_pressed"]
[connection signal="pressed" from="Weapon Selection/Bow/Weapon" to="." method="_on_select_bow_pressed"]
[connection signal="pressed" from="Weapon Selection/Javelin/Weapon" to="." method="_on_select_javelin_pressed"]
[connection signal="pressed" from="Weapon Selection/Staff/Weapon" to="." method="_on_select_staff_pressed"]
[connection signal="pressed" from="Weapon Selection/Sword/Weapon" to="." method="_on_select_sword_pressed"]

41
GUI/Inventory Menu.tscn Normal file
View File

@@ -0,0 +1,41 @@
[gd_scene format=2]
[node name="Inventory Menu" type="Node"]
[node name="CenterContainer" type="CenterContainer" parent="."]
rect_min_size = Vector2( 320, 180 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
margin_left = 53.0
margin_top = 78.0
margin_right = 266.0
margin_bottom = 102.0
[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/VBoxContainer"]
margin_right = 213.0
margin_bottom = 20.0
[node name="Button" type="Button" parent="CenterContainer/VBoxContainer/HBoxContainer"]
margin_right = 71.0
margin_bottom = 20.0
text = "Weapons"
[node name="Button2" type="Button" parent="CenterContainer/VBoxContainer/HBoxContainer"]
margin_left = 75.0
margin_right = 164.0
margin_bottom = 20.0
text = "Accessories"
[node name="Button3" type="Button" parent="CenterContainer/VBoxContainer/HBoxContainer"]
margin_left = 168.0
margin_right = 213.0
margin_bottom = 20.0
text = "Skills"
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer/VBoxContainer"]
margin_top = 24.0
margin_right = 213.0
margin_bottom = 24.0

33
GUI/Level Select Menu.gd Normal file
View File

@@ -0,0 +1,33 @@
extends Node
signal complete(option)
func _on_hub_world_button_pressed() -> void:
emit_signal('complete', 'H')
return
func _on_level_1_button_pressed() -> void:
emit_signal('complete', '1')
return
func _on_level_2_button_pressed() -> void:
emit_signal('complete', '2')
return
func _on_level_3_button_pressed() -> void:
emit_signal('complete', '3')
return
func _on_level_4_button_pressed() -> void:
emit_signal('complete', '4')
return
func _on_level_5_button_pressed() -> void:
emit_signal('complete', '5')
return

View File

@@ -0,0 +1,74 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://Sprites/Menus/Level Select/Level_3_Button_Normal.png" type="Texture" id=1]
[ext_resource path="res://Sprites/Menus/Level Select/Level_1_Button_Normal.png" type="Texture" id=2]
[ext_resource path="res://Sprites/Menus/Level Select/Level_4_Button_Normal.png" type="Texture" id=3]
[ext_resource path="res://Sprites/Menus/Level Select/Level_2_Button_Normal.png" type="Texture" id=4]
[ext_resource path="res://Sprites/Menus/Level Select/Level_5_Button_Normal.png" type="Texture" id=5]
[ext_resource path="res://Sprites/Menus/Level Select/Hub_World_Button_Normal.png" type="Texture" id=6]
[ext_resource path="res://GUI/Level Select Menu.gd" type="Script" id=7]
[node name="Level Select Menu" type="Node"]
script = ExtResource( 7 )
[node name="MarginContainer" type="MarginContainer" parent="."]
margin_left = 10.0
margin_top = 10.0
margin_right = 310.0
margin_bottom = 170.0
rect_min_size = Vector2( 300, 160 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CenterContainer" type="CenterContainer" parent="MarginContainer"]
margin_right = 300.0
margin_bottom = 160.0
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/CenterContainer"]
margin_left = 20.0
margin_top = 60.0
margin_right = 280.0
margin_bottom = 100.0
[node name="Hub World" type="TextureButton" parent="MarginContainer/CenterContainer/HBoxContainer"]
margin_right = 40.0
margin_bottom = 40.0
texture_normal = ExtResource( 6 )
[node name="Level 1" type="TextureButton" parent="MarginContainer/CenterContainer/HBoxContainer"]
margin_left = 44.0
margin_right = 84.0
margin_bottom = 40.0
texture_normal = ExtResource( 2 )
[node name="Level 2" type="TextureButton" parent="MarginContainer/CenterContainer/HBoxContainer"]
margin_left = 88.0
margin_right = 128.0
margin_bottom = 40.0
texture_normal = ExtResource( 4 )
[node name="Level 3" type="TextureButton" parent="MarginContainer/CenterContainer/HBoxContainer"]
margin_left = 132.0
margin_right = 172.0
margin_bottom = 40.0
texture_normal = ExtResource( 1 )
[node name="Level 4" type="TextureButton" parent="MarginContainer/CenterContainer/HBoxContainer"]
margin_left = 176.0
margin_right = 216.0
margin_bottom = 40.0
texture_normal = ExtResource( 3 )
[node name="Level 5" type="TextureButton" parent="MarginContainer/CenterContainer/HBoxContainer"]
margin_left = 220.0
margin_right = 260.0
margin_bottom = 40.0
texture_normal = ExtResource( 5 )
[connection signal="pressed" from="MarginContainer/CenterContainer/HBoxContainer/Hub World" to="." method="_on_hub_world_button_pressed"]
[connection signal="pressed" from="MarginContainer/CenterContainer/HBoxContainer/Level 1" to="." method="_on_level_1_button_pressed"]
[connection signal="pressed" from="MarginContainer/CenterContainer/HBoxContainer/Level 2" to="." method="_on_level_2_button_pressed"]
[connection signal="pressed" from="MarginContainer/CenterContainer/HBoxContainer/Level 3" to="." method="_on_level_3_button_pressed"]
[connection signal="pressed" from="MarginContainer/CenterContainer/HBoxContainer/Level 4" to="." method="_on_level_4_button_pressed"]
[connection signal="pressed" from="MarginContainer/CenterContainer/HBoxContainer/Level 5" to="." method="_on_level_5_button_pressed"]

39
GUI/Main Menu.gd Normal file
View File

@@ -0,0 +1,39 @@
extends CanvasLayer
signal complete(option)
func _on_new_game_button_pressed() -> void:
emit_signal('complete', 'new game')
return
func _on_quit_button_pressed() -> void:
get_tree().quit()
return
func _on_continue_button_mouse_entered() -> void:
if not $'Menu/Menu Elements/Menu Options/Continue/Continue Button'.disabled:
$'Menu Button Hover'.play(0.0)
return
func _on_new_game_button_mouse_entered() -> void:
$'Menu Button Hover'.play(0.0)
return
func _on_settings_button_mouse_entered() -> void:
$'Menu Button Hover'.play(0.0)
return
func _on_credits_button_mouse_entered() -> void:
$'Menu Button Hover'.play(0.0)
return
func _on_quit_button_mouse_entered() -> void:
$'Menu Button Hover'.play(0.0)
return

143
GUI/Main Menu.tscn Normal file
View File

@@ -0,0 +1,143 @@
[gd_scene load_steps=18 format=2]
[ext_resource path="res://Sprites/Menus/Menu Buttons/Settings_Button_Normal.png" type="Texture" id=1]
[ext_resource path="res://Sprites/Menus/Menu Buttons/Continue_Button_Hover.png" type="Texture" id=2]
[ext_resource path="res://Sprites/Menus/Menu Buttons/Credits_Button_Normal.png" type="Texture" id=3]
[ext_resource path="res://Sprites/Menus/Menu Buttons/Continue_Button_Normal.png" type="Texture" id=4]
[ext_resource path="res://Sprites/Menus/Menu Buttons/New_Game_Button_Normal.png" type="Texture" id=5]
[ext_resource path="res://Sprites/Menus/Menu Buttons/Continue_Button_Disabled.png" type="Texture" id=6]
[ext_resource path="res://Sprites/Menus/Menu Buttons/New_Game_Button_Hover.png" type="Texture" id=7]
[ext_resource path="res://Sprites/Menus/Menu Buttons/Quit_Button_Normal.png" type="Texture" id=8]
[ext_resource path="res://Sprites/Menus/Menu Buttons/Credits_Button_Hover.png" type="Texture" id=9]
[ext_resource path="res://Sprites/Menus/Menu Buttons/Settings_Button_Hover.png" type="Texture" id=10]
[ext_resource path="res://Sprites/Menus/Menu Buttons/Quit_Button_Hover.png" type="Texture" id=11]
[ext_resource path="res://Sprites/Menus/Main Menu/Main_Menu_Background.png" type="Texture" id=12]
[ext_resource path="res://Resources/Ash.tres" type="DynamicFontData" id=13]
[ext_resource path="res://GUI/Main Menu.gd" type="Script" id=14]
[ext_resource path="res://Music/Main_Menu.mp3" type="AudioStream" id=15]
[ext_resource path="res://Sounds/Menu_Button_Hover.wav" type="AudioStream" id=16]
[sub_resource type="DynamicFont" id=1]
size = 20
use_mipmaps = true
extra_spacing_bottom = 15
font_data = ExtResource( 13 )
[node name="Main Menu" type="CanvasLayer"]
script = ExtResource( 14 )
[node name="Background" type="TextureRect" parent="."]
texture = ExtResource( 12 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Menu" type="CenterContainer" parent="."]
margin_left = 10.0
margin_top = 10.0
margin_right = 310.0
margin_bottom = 170.0
rect_min_size = Vector2( 300, 160 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Menu Elements" type="VBoxContainer" parent="Menu"]
margin_left = 42.0
margin_top = 11.0
margin_right = 257.0
margin_bottom = 149.0
alignment = 2
[node name="Title" type="Label" parent="Menu/Menu Elements"]
margin_right = 215.0
margin_bottom = 40.0
rect_min_size = Vector2( 0, 40 )
custom_fonts/font = SubResource( 1 )
text = "Embodiment"
align = 1
valign = 1
[node name="Menu Options" type="VBoxContainer" parent="Menu/Menu Elements"]
margin_top = 44.0
margin_right = 215.0
margin_bottom = 138.0
[node name="Continue" type="CenterContainer" parent="Menu/Menu Elements/Menu Options"]
margin_right = 215.0
margin_bottom = 15.0
[node name="Continue Button" type="TextureButton" parent="Menu/Menu Elements/Menu Options/Continue"]
margin_left = 73.0
margin_right = 141.0
margin_bottom = 15.0
disabled = true
texture_normal = ExtResource( 4 )
texture_hover = ExtResource( 2 )
texture_disabled = ExtResource( 6 )
[node name="New Game" type="CenterContainer" parent="Menu/Menu Elements/Menu Options"]
margin_top = 19.0
margin_right = 215.0
margin_bottom = 33.0
[node name="New Game Button" type="TextureButton" parent="Menu/Menu Elements/Menu Options/New Game"]
margin_left = 66.0
margin_right = 149.0
margin_bottom = 14.0
texture_normal = ExtResource( 5 )
texture_hover = ExtResource( 7 )
[node name="Settings" type="CenterContainer" parent="Menu/Menu Elements/Menu Options"]
margin_top = 37.0
margin_right = 215.0
margin_bottom = 56.0
[node name="Settings Button" type="TextureButton" parent="Menu/Menu Elements/Menu Options/Settings"]
margin_left = 77.0
margin_right = 138.0
margin_bottom = 19.0
texture_normal = ExtResource( 1 )
texture_hover = ExtResource( 10 )
[node name="Credits" type="CenterContainer" parent="Menu/Menu Elements/Menu Options"]
margin_top = 60.0
margin_right = 215.0
margin_bottom = 75.0
[node name="Credits Button" type="TextureButton" parent="Menu/Menu Elements/Menu Options/Credits"]
margin_left = 82.0
margin_right = 133.0
margin_bottom = 15.0
texture_normal = ExtResource( 3 )
texture_hover = ExtResource( 9 )
[node name="Quit" type="CenterContainer" parent="Menu/Menu Elements/Menu Options"]
margin_top = 79.0
margin_right = 215.0
margin_bottom = 94.0
[node name="Quit Button" type="TextureButton" parent="Menu/Menu Elements/Menu Options/Quit"]
margin_left = 90.0
margin_right = 124.0
margin_bottom = 15.0
texture_normal = ExtResource( 8 )
texture_hover = ExtResource( 11 )
[node name="BGM" type="AudioStreamPlayer" parent="."]
pause_mode = 2
stream = ExtResource( 15 )
volume_db = -15.0
autoplay = true
[node name="Menu Button Hover" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 16 )
volume_db = -16.0
[connection signal="mouse_entered" from="Menu/Menu Elements/Menu Options/Continue/Continue Button" to="." method="_on_continue_button_mouse_entered"]
[connection signal="mouse_entered" from="Menu/Menu Elements/Menu Options/New Game/New Game Button" to="." method="_on_new_game_button_mouse_entered"]
[connection signal="pressed" from="Menu/Menu Elements/Menu Options/New Game/New Game Button" to="." method="_on_new_game_button_pressed"]
[connection signal="mouse_entered" from="Menu/Menu Elements/Menu Options/Settings/Settings Button" to="." method="_on_settings_button_mouse_entered"]
[connection signal="mouse_entered" from="Menu/Menu Elements/Menu Options/Credits/Credits Button" to="." method="_on_credits_button_mouse_entered"]
[connection signal="mouse_entered" from="Menu/Menu Elements/Menu Options/Quit/Quit Button" to="." method="_on_quit_button_mouse_entered"]
[connection signal="pressed" from="Menu/Menu Elements/Menu Options/Quit/Quit Button" to="." method="_on_quit_button_pressed"]

39
GUI/Pause Screen.gd Normal file
View File

@@ -0,0 +1,39 @@
extends CanvasLayer
func _on_resume_button_pressed() -> void:
resume()
return
func _on_quit_button_pressed() -> void:
get_tree().quit()
return
func _on_resume_button_mouse_entered() -> void:
$'Menu Button Hover'.play(0.0)
return
func _on_quit_button_mouse_entered() -> void:
$'Menu Button Hover'.play(0.0)
return
func _input(event: InputEvent) -> void:
if event.is_action_pressed('ui_cancel'):
if get_tree().paused:
resume()
else:
get_tree().paused = true
$Background.visible = true
$Menu.visible = true
return
func resume() -> void:
$Background.visible = false
$Menu.visible = false
get_tree().paused = false
return

71
GUI/Pause Screen.tscn Normal file
View File

@@ -0,0 +1,71 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://Sprites/Assets/Black_Background.png" type="Texture" id=1]
[ext_resource path="res://Sprites/Menus/Menu Buttons/Quit_Button_Normal.png" type="Texture" id=2]
[ext_resource path="res://Sprites/Menus/Menu Buttons/Resume_Button_Normal.png" type="Texture" id=3]
[ext_resource path="res://Sprites/Menus/Menu Buttons/Resume_Button_Hover.png" type="Texture" id=4]
[ext_resource path="res://Sprites/Menus/Menu Buttons/Quit_Button_Hover.png" type="Texture" id=5]
[ext_resource path="res://GUI/Pause Screen.gd" type="Script" id=6]
[ext_resource path="res://Sounds/Menu_Button_Hover.wav" type="AudioStream" id=7]
[node name="Pause Screen" type="CanvasLayer"]
pause_mode = 2
script = ExtResource( 6 )
[node name="Background" type="TextureRect" parent="."]
visible = false
self_modulate = Color( 1, 1, 1, 0.313726 )
light_mask = 0
rect_min_size = Vector2( 320, 180 )
texture = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Menu" type="CenterContainer" parent="."]
visible = false
margin_left = 80.0
margin_top = 10.0
margin_right = 240.0
margin_bottom = 170.0
rect_min_size = Vector2( 160, 160 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Menu Options" type="VBoxContainer" parent="Menu"]
margin_left = 49.0
margin_top = 63.0
margin_right = 111.0
margin_bottom = 97.0
[node name="Resume" type="CenterContainer" parent="Menu/Menu Options"]
margin_right = 62.0
margin_bottom = 15.0
[node name="Resume Button" type="TextureButton" parent="Menu/Menu Options/Resume"]
margin_right = 62.0
margin_bottom = 15.0
texture_normal = ExtResource( 3 )
texture_hover = ExtResource( 4 )
[node name="Quit" type="CenterContainer" parent="Menu/Menu Options"]
margin_top = 19.0
margin_right = 62.0
margin_bottom = 34.0
[node name="Quit Button" type="TextureButton" parent="Menu/Menu Options/Quit"]
margin_left = 14.0
margin_right = 48.0
margin_bottom = 15.0
texture_normal = ExtResource( 2 )
texture_hover = ExtResource( 5 )
[node name="Menu Button Hover" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 7 )
volume_db = -16.0
[connection signal="mouse_entered" from="Menu/Menu Options/Resume/Resume Button" to="." method="_on_resume_button_mouse_entered"]
[connection signal="pressed" from="Menu/Menu Options/Resume/Resume Button" to="." method="_on_resume_button_pressed"]
[connection signal="mouse_entered" from="Menu/Menu Options/Quit/Quit Button" to="." method="_on_quit_button_mouse_entered"]
[connection signal="pressed" from="Menu/Menu Options/Quit/Quit Button" to="." method="_on_quit_button_pressed"]

29
GUI/Splash Screen.gd Normal file
View File

@@ -0,0 +1,29 @@
extends Sprite
signal complete
func _ready() -> void:
# Fade in
if not $Tween.interpolate_property(self, 'self_modulate:a', 0, 1, 3, Tween.TRANS_LINEAR, Tween.EASE_IN):
print('ERROR: Splash Screen fade in animation has errors.')
if not $Tween.start():
print('ERROR: Splash Screen fade in animation failed to start.')
yield($Tween, 'tween_completed') # Wait for fade in to complete
# Fade out
if not $Tween.interpolate_property(self, 'self_modulate:a', 1, 0, 3, Tween.TRANS_LINEAR, Tween.EASE_OUT, 2):
print('ERROR: Splash Screen fade out animation has errors.')
if not $Tween.start():
print('ERROR: Splash Screen fade out animation failed to start.')
yield($Tween, 'tween_completed') # Wait for fade out to complete
emit_signal('complete')
return
func _input(event: InputEvent) -> void:
if event.is_action_pressed('ui_accept'):
emit_signal('complete')
return

18
GUI/Splash Screen.tscn Normal file
View File

@@ -0,0 +1,18 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Sprites/Assets/Splash_Screen.png" type="Texture" id=1]
[ext_resource path="res://GUI/Splash Screen.gd" type="Script" id=2]
[ext_resource path="res://Music/Splash_Screen.wav" type="AudioStream" id=3]
[node name="Splash Screen" type="Sprite"]
self_modulate = Color( 1, 1, 1, 0 )
texture = ExtResource( 1 )
centered = false
script = ExtResource( 2 )
[node name="Tween" type="Tween" parent="."]
[node name="BGM" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 3 )
volume_db = -15.0
autoplay = true