Added some Level 5 implementation and reorganized file structure

This commit is contained in:
VoidTwo
2021-11-27 17:36:06 -06:00
parent 2c98c112bd
commit aac45f808c
114 changed files with 1892 additions and 638 deletions

View File

@@ -16,3 +16,60 @@ func update_currency(amount: int) -> void:
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

View File

@@ -1,17 +1,30 @@
[gd_scene load_steps=5 format=2]
[gd_scene load_steps=12 format=2]
[ext_resource path="res://GUI/HUD.gd" type="Script" id=1]
[ext_resource path="res://Sprites/Health_Bar_Under.png" type="Texture" id=2]
[ext_resource path="res://Sprites/Health_Bar_Progress.png" type="Texture" id=3]
[ext_resource path="res://Sprites/Health_Bar_Over.png" type="Texture" id=4]
[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_right = 104.0
margin_bottom = 18.0
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 )
@@ -21,8 +34,13 @@ __meta__ = {
}
[node name="Currency" type="Label" parent="."]
margin_left = 220.0
margin_right = 320.0
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__ = {
@@ -30,6 +48,7 @@ __meta__ = {
}
[node name="Add Currency" type="Button" parent="."]
visible = false
margin_left = 300.0
margin_top = 20.0
margin_right = 320.0
@@ -37,4 +56,127 @@ __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

View File

@@ -1,11 +1,11 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://Levels/Level_3_Button_Normal.png" type="Texture" id=1]
[ext_resource path="res://Levels/Level_1_Button_Normal.png" type="Texture" id=2]
[ext_resource path="res://Levels/Level_4_Button_Normal.png" type="Texture" id=3]
[ext_resource path="res://Levels/Level_2_Button_Normal.png" type="Texture" id=4]
[ext_resource path="res://Levels/Level_5_Button_Normal.png" type="Texture" id=5]
[ext_resource path="res://Levels/Hub_World_Button_Normal.png" type="Texture" id=6]
[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"]

View File

@@ -1,17 +1,17 @@
[gd_scene load_steps=16 format=2]
[ext_resource path="res://Sprites/Settings_Button_Normal.png" type="Texture" id=1]
[ext_resource path="res://Sprites/Continue_Button_Hover.png" type="Texture" id=2]
[ext_resource path="res://Sprites/Credits_Button_Normal.png" type="Texture" id=3]
[ext_resource path="res://Sprites/Continue_Button_Normal.png" type="Texture" id=4]
[ext_resource path="res://Sprites/New_Game_Button_Normal.png" type="Texture" id=5]
[ext_resource path="res://Sprites/Continue_Button_Disabled.png" type="Texture" id=6]
[ext_resource path="res://Sprites/New_Game_Button_Hover.png" type="Texture" id=7]
[ext_resource path="res://Sprites/Quit_Button_Normal.png" type="Texture" id=8]
[ext_resource path="res://Sprites/Credits_Button_Hover.png" type="Texture" id=9]
[ext_resource path="res://Sprites/Settings_Button_Hover.png" type="Texture" id=10]
[ext_resource path="res://Sprites/Quit_Button_Hover.png" type="Texture" id=11]
[ext_resource path="res://Sprites/Main_Menu_Background.png" type="Texture" id=12]
[ext_resource path="res://Sprites/Menus/Main Menu/Settings_Button_Normal.png" type="Texture" id=1]
[ext_resource path="res://Sprites/Menus/Main Menu/Continue_Button_Hover.png" type="Texture" id=2]
[ext_resource path="res://Sprites/Menus/Main Menu/Credits_Button_Normal.png" type="Texture" id=3]
[ext_resource path="res://Sprites/Menus/Main Menu/Continue_Button_Normal.png" type="Texture" id=4]
[ext_resource path="res://Sprites/Menus/Main Menu/New_Game_Button_Normal.png" type="Texture" id=5]
[ext_resource path="res://Sprites/Menus/Main Menu/Continue_Button_Disabled.png" type="Texture" id=6]
[ext_resource path="res://Sprites/Menus/Main Menu/New_Game_Button_Hover.png" type="Texture" id=7]
[ext_resource path="res://Sprites/Menus/Main Menu/Quit_Button_Normal.png" type="Texture" id=8]
[ext_resource path="res://Sprites/Menus/Main Menu/Credits_Button_Hover.png" type="Texture" id=9]
[ext_resource path="res://Sprites/Menus/Main Menu/Settings_Button_Hover.png" type="Texture" id=10]
[ext_resource path="res://Sprites/Menus/Main Menu/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]

View File

@@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Sprites/Splash_Screen.png" type="Texture" id=1]
[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]
[node name="Splash Screen" type="Sprite"]