some ui improvements

This commit is contained in:
Lexi Quinn 2023-12-09 01:09:12 +11:00
parent e97bf84612
commit 7dd8f88ca7
35 changed files with 408 additions and 216 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bskg4kgoi576f"
path="res://.godot/imported/Sprite-0001.png-bcbcb9533be8ecc780dc0ae29b20866a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/Sprite-0001.png"
dest_files=["res://.godot/imported/Sprite-0001.png-bcbcb9533be8ecc780dc0ae29b20866a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
Assets/Textures/doe.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d4jd718brpsed"
path="res://.godot/imported/doe.png-0b462f474a89e4444087921c34063883.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/doe.png"
dest_files=["res://.godot/imported/doe.png-0b462f474a89e4444087921c34063883.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -3,25 +3,26 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://r202vo47jw1q"
path="res://.godot/imported/enemyhealth.png-06bafefa2afa5a94b9192b00e9045f10.ctex"
path.s3tc="res://.godot/imported/enemyhealth.png-06bafefa2afa5a94b9192b00e9045f10.s3tc.ctex"
metadata={
"vram_texture": false
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://Assets/Textures/enemyhealth.png"
dest_files=["res://.godot/imported/enemyhealth.png-06bafefa2afa5a94b9192b00e9045f10.ctex"]
dest_files=["res://.godot/imported/enemyhealth.png-06bafefa2afa5a94b9192b00e9045f10.s3tc.ctex"]
[params]
compress/mode=0
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
@ -31,4 +32,4 @@ process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
detect_3d/compress_to=0

BIN
Assets/Textures/yeen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bvybr3fwnw46p"
path="res://.godot/imported/yeen.png-7e4cd8ed0042fa789621e24f031bf7be.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/yeen.png"
dest_files=["res://.godot/imported/yeen.png-7e4cd8ed0042fa789621e24f031bf7be.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -5,11 +5,11 @@
[ext_resource type="Resource" uid="uid://deer0awg4d18o" path="res://PCs/Universal/ClassCards/Assault/card_assault.tres" id="2_3yr5a"]
[ext_resource type="Resource" uid="uid://ckm88acryitl4" path="res://PCs/Universal/ClassCards/Sniper/card_sniper.tres" id="3_wyb0n"]
[ext_resource type="Texture2D" uid="uid://bvaif1sfn1ej4" path="res://PCs/Blue/blue_hand.png" id="4_srskc"]
[ext_resource type="Texture2D" uid="uid://cnedls3i4gso" path="res://PCs/Blue/blue.png" id="5_qucwv"]
[ext_resource type="Texture2D" uid="uid://bvybr3fwnw46p" path="res://Assets/Textures/yeen.png" id="6_jda20"]
[resource]
script = ExtResource("1_aeu85")
hero_name = "Blue"
texture = ExtResource("5_qucwv")
hero_name = "Mage"
texture = ExtResource("6_jda20")
hand_texture = ExtResource("4_srskc")
deck = Array[Resource("res://Scripts/Resources/card.gd")]([ExtResource("1_uvyoy"), ExtResource("2_3yr5a"), ExtResource("3_wyb0n"), ExtResource("2_3yr5a")])

View File

@ -5,11 +5,11 @@
[ext_resource type="Resource" uid="uid://ckm88acryitl4" path="res://PCs/Universal/ClassCards/Sniper/card_sniper.tres" id="2_hkiwr"]
[ext_resource type="Resource" uid="uid://b37r54q84vqoi" path="res://PCs/Universal/ClassCards/RocketLauncher/card_rocket_launcher.tres" id="3_ruhqi"]
[ext_resource type="Texture2D" uid="uid://ctkixdue3o7ec" path="res://PCs/Red/red_hand.png" id="4_wnhdj"]
[ext_resource type="Texture2D" uid="uid://cjqxkraykhxxk" path="res://PCs/Red/red.png" id="5_raux1"]
[ext_resource type="Texture2D" uid="uid://d4jd718brpsed" path="res://Assets/Textures/doe.png" id="6_btlgg"]
[resource]
script = ExtResource("1_1wkap")
hero_name = "Red"
texture = ExtResource("5_raux1")
hero_name = "Militant"
texture = ExtResource("6_btlgg")
hand_texture = ExtResource("4_wnhdj")
deck = Array[Resource("res://Scripts/Resources/card.gd")]([ExtResource("2_hkiwr"), ExtResource("3_ruhqi"), ExtResource("1_iiksa"), ExtResource("1_iiksa")])

View File

@ -111,9 +111,7 @@ func _process(delta: float) -> void:
button.press()
currency -= button.press_cost
if interaction_raycast.get_collider() is ItemCard:
var pickup = interaction_raycast.get_collider().pick_up()
inventory.add(pickup)
hud.pickup(pickup)
add_card(interaction_raycast.get_collider().pick_up())
if Input.is_action_just_pressed("Equip In Gauntlet"):
equip_weapon()
if Input.is_action_just_pressed("Secondary Fire"):
@ -200,6 +198,7 @@ func enter_editing_mode(value):
hud.set_wave_count(value + 1)
hud.set_energy_visible(false)
hud.set_offhand_energy_visible(false)
hud.grow_wave_start_label()
editing_mode = true
edit_tool.enabled = true
left_hand.set_visible(true)
@ -212,6 +211,7 @@ func exit_editing_mode(value):
gauntlet_sprite.set_visible(false)
weapons_active = false
hud.set_wave_count(value)
hud.shrink_wave_start_label()
if !weapon and offhand_weapon:
swap_weapons()
if weapon:

View File

@ -286,7 +286,7 @@ head = NodePath("../ViewMovement")
max_look_down_angle = 80.0
max_look_up_angle = 80.0
[node name="HUD" type="CanvasLayer" parent="." node_paths=PackedStringArray("wave_count", "lives_count", "currency_count", "minimap_outline", "crosshair", "minimap", "minimap_cam", "minimap_viewport", "fps_label", "hover_text", "enemy_sprites", "enemy_counts", "weapon_energy_bar", "offhand_energy_bar")]
[node name="HUD" type="CanvasLayer" parent="." node_paths=PackedStringArray("wave_count", "lives_count", "currency_count", "minimap_outline", "crosshair", "minimap", "minimap_cam", "minimap_viewport", "fps_label", "hover_text", "enemy_sprites", "enemy_counts", "weapon_energy_bar", "offhand_energy_bar", "wave_start_label")]
script = ExtResource("8_yl6ka")
wave_count = NodePath("WaveCount")
lives_count = NodePath("LivesCount")
@ -303,6 +303,7 @@ enemy_counts = [NodePath("EnemyTracker/TextureRect/Label"), NodePath("EnemyTrack
weapon_energy_bar = NodePath("PrimaryEnergyBar")
offhand_energy_bar = NodePath("OffhandEnergyBar")
pickup_notif_scene = ExtResource("17_oyeww")
wave_start_label = NodePath("Label")
[node name="FirstPersonCam" type="TextureRect" parent="HUD"]
anchors_preset = 15
@ -608,6 +609,20 @@ offset_bottom = -40.0
grow_vertical = 0
alignment = 2
[node name="Label" type="Label" parent="HUD"]
anchors_preset = -1
anchor_left = 0.5
anchor_right = 0.5
offset_left = -300.0
offset_top = 110.0
offset_right = 300.0
offset_bottom = 160.0
grow_horizontal = 2
text = "Press [Button] to start wave"
horizontal_alignment = 1
vertical_alignment = 1
clip_text = true
[node name="WeaponSwapTimer" type="Timer" parent="."]
wait_time = 0.9
one_shot = true

View File

@ -19,13 +19,9 @@ layout_mode = 2
layout_mode = 2
text = "Unable to connect to server"
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"]
layout_mode = 2
theme_override_constants/margin_right = 28
[node name="Button" type="Button" parent="VBoxContainer/MarginContainer"]
[node name="Button" type="Button" parent="VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 8
text = "OK"
[connection signal="pressed" from="VBoxContainer/MarginContainer/Button" to="." method="_on_button_pressed"]
[connection signal="pressed" from="VBoxContainer/Button" to="." method="_on_button_pressed"]

View File

@ -26,23 +26,13 @@ text = "Some Text?"
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 30
theme_override_constants/margin_right = 30
[node name="Confirm" type="Button" parent="VBoxContainer/HBoxContainer/MarginContainer"]
[node name="Confirm" type="Button" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Confirm"
[node name="MarginContainer2" type="MarginContainer" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 30
theme_override_constants/margin_right = 30
[node name="Cancel" type="Button" parent="VBoxContainer/HBoxContainer/MarginContainer2"]
[node name="Cancel" type="Button" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Cancel"
[connection signal="pressed" from="VBoxContainer/HBoxContainer/MarginContainer/Confirm" to="." method="_on_confirm_pressed"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer/MarginContainer2/Cancel" to="." method="_on_cancel_pressed"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer/Confirm" to="." method="_on_confirm_pressed"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer/Cancel" to="." method="_on_cancel_pressed"]

View File

@ -32,29 +32,27 @@ offset_bottom = 26.0
grow_horizontal = 2
text = "You Lost"
[node name="RestartButton" type="Button" parent="."]
[node name="HBoxContainer" type="HBoxContainer" parent="."]
layout_mode = 1
anchors_preset = -1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
offset_left = -44.0
offset_top = 270.0
offset_right = -161.0
offset_bottom = 31.0
anchor_bottom = 0.5
offset_left = -274.0
offset_top = -20.0
offset_right = 274.0
offset_bottom = 20.0
grow_horizontal = 2
grow_vertical = 2
[node name="RestartButton" type="Button" parent="HBoxContainer"]
layout_mode = 2
text = "Play Again"
[node name="QuitButton" type="Button" parent="."]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_right = 0.5
offset_left = 264.0
offset_top = 270.0
offset_right = 21.0
offset_bottom = 31.0
grow_horizontal = 2
[node name="QuitButton" type="Button" parent="HBoxContainer"]
layout_mode = 2
text = "Quit to main menu"
[connection signal="pressed" from="RestartButton" to="." method="_on_restart_button_pressed"]
[connection signal="pressed" from="QuitButton" to="." method="_on_quit_button_pressed"]
[connection signal="pressed" from="HBoxContainer/RestartButton" to="." method="_on_restart_button_pressed"]
[connection signal="pressed" from="HBoxContainer/QuitButton" to="." method="_on_quit_button_pressed"]

View File

@ -53,48 +53,20 @@ offset_right = 143.0
offset_bottom = -80.0
grow_vertical = 0
[node name="MarginContainer" type="MarginContainer" parent="MainControls"]
layout_mode = 2
theme_override_constants/margin_left = 0
theme_override_constants/margin_top = 3
theme_override_constants/margin_right = 0
theme_override_constants/margin_bottom = 3
[node name="PlayButton" type="Button" parent="MainControls/MarginContainer"]
[node name="PlayButton" type="Button" parent="MainControls"]
layout_mode = 2
text = "Play"
[node name="MarginContainer2" type="MarginContainer" parent="MainControls"]
layout_mode = 2
theme_override_constants/margin_left = 0
theme_override_constants/margin_top = 3
theme_override_constants/margin_right = 0
theme_override_constants/margin_bottom = 3
[node name="MultiplayerButton" type="Button" parent="MainControls/MarginContainer2"]
[node name="MultiplayerButton" type="Button" parent="MainControls"]
layout_mode = 2
text = "Multiplayer"
[node name="MarginContainer3" type="MarginContainer" parent="MainControls"]
layout_mode = 2
theme_override_constants/margin_left = 0
theme_override_constants/margin_top = 3
theme_override_constants/margin_right = 0
theme_override_constants/margin_bottom = 3
[node name="OptionsButton" type="Button" parent="MainControls/MarginContainer3"]
[node name="OptionsButton" type="Button" parent="MainControls"]
layout_mode = 2
text = "Options
"
[node name="MarginContainer4" type="MarginContainer" parent="MainControls"]
layout_mode = 2
theme_override_constants/margin_left = 0
theme_override_constants/margin_top = 3
theme_override_constants/margin_right = 0
theme_override_constants/margin_bottom = 3
[node name="QuitButton" type="Button" parent="MainControls/MarginContainer4"]
[node name="QuitButton" type="Button" parent="MainControls"]
layout_mode = 2
text = "Quit
"
@ -146,8 +118,8 @@ size = Vector2i(1920, 1080)
[node name="GridMap" parent="SubViewport" instance=ExtResource("3_l8r4a")]
[connection signal="pressed" from="MainControls/MarginContainer/PlayButton" to="." method="_on_play_button_pressed"]
[connection signal="pressed" from="MainControls/MarginContainer2/MultiplayerButton" to="." method="_on_multiplayer_button_pressed"]
[connection signal="pressed" from="MainControls/MarginContainer3/OptionsButton" to="." method="_on_options_button_pressed"]
[connection signal="pressed" from="MainControls/MarginContainer4/QuitButton" to="." method="_on_quit_button_pressed"]
[connection signal="pressed" from="MainControls/PlayButton" to="." method="_on_play_button_pressed"]
[connection signal="pressed" from="MainControls/MultiplayerButton" to="." method="_on_multiplayer_button_pressed"]
[connection signal="pressed" from="MainControls/OptionsButton" to="." method="_on_options_button_pressed"]
[connection signal="pressed" from="MainControls/QuitButton" to="." method="_on_quit_button_pressed"]
[connection signal="pressed" from="ProfileEditor/VBoxContainer/HBoxContainer/MarginContainer/DisplayNameEdit" to="." method="_on_display_name_edit_pressed"]

View File

@ -3,8 +3,8 @@
[ext_resource type="Theme" uid="uid://b6a0ip4p72tgx" path="res://new_theme.tres" id="1_l1spu"]
[ext_resource type="Script" path="res://Scripts/multiplayer_lobby.gd" id="2_nb860"]
[ext_resource type="PackedScene" uid="uid://dpt3kpixawyby" path="res://Scenes/UI/scoreboard.tscn" id="3_f6bia"]
[ext_resource type="PackedScene" uid="uid://3kcl30sump8c" path="res://Scenes/Menus/LoadoutEditor.tscn" id="4_bmg55"]
[ext_resource type="PackedScene" uid="uid://bvfit0sy2tnw4" path="res://Scenes/Menus/server_form.tscn" id="5_bqbwv"]
[ext_resource type="PackedScene" uid="uid://dqqitmhu66a7d" path="res://charselect.tscn" id="5_lvoo2"]
[ext_resource type="PackedScene" uid="uid://ddmg342ff2qaq" path="res://Scenes/UI/chatbox.tscn" id="6_wtqwd"]
[node name="multiplayer_lobby" type="Control" node_paths=PackedStringArray("server_form", "scoreboard", "loadout_editor", "chatbox")]
@ -19,7 +19,7 @@ theme = ExtResource("1_l1spu")
script = ExtResource("2_nb860")
server_form = NodePath("ServerForm")
scoreboard = NodePath("Scoreboard")
loadout_editor = NodePath("Panel")
loadout_editor = NodePath("Control")
chatbox = NodePath("Chatbox")
[node name="ServerForm" parent="." instance=ExtResource("5_bqbwv")]
@ -39,12 +39,9 @@ offset_left = -472.0
offset_right = -50.0
grow_horizontal = 0
[node name="Panel" parent="." instance=ExtResource("4_bmg55")]
[node name="Control" parent="." instance=ExtResource("5_lvoo2")]
visible = false
layout_mode = 1
anchors_preset = -1
offset_left = 50.0
offset_right = 455.0
[node name="ReadyButton" type="Button" parent="."]
visible = false

View File

@ -46,27 +46,13 @@ layout_mode = 2
layout_mode = 2
alignment = 2
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 30
theme_override_constants/margin_top = 5
theme_override_constants/margin_right = 30
theme_override_constants/margin_bottom = 5
[node name="Cancel" type="Button" parent="VBoxContainer/HBoxContainer/MarginContainer"]
[node name="Cancel" type="Button" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Discard"
[node name="MarginContainer2" type="MarginContainer" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 30
theme_override_constants/margin_top = 5
theme_override_constants/margin_right = 30
theme_override_constants/margin_bottom = 5
[node name="Confirm" type="Button" parent="VBoxContainer/HBoxContainer/MarginContainer2"]
[node name="Confirm" type="Button" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Confirm"
[connection signal="pressed" from="VBoxContainer/HBoxContainer/MarginContainer/Cancel" to="." method="_on_cancel_pressed"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer/MarginContainer2/Confirm" to="." method="_on_confirm_pressed"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer/Cancel" to="." method="_on_cancel_pressed"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer/Confirm" to="." method="_on_confirm_pressed"]

View File

@ -39,51 +39,23 @@ grow_vertical = 2
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
layout_mode = 2
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 24
theme_override_constants/margin_top = 5
theme_override_constants/margin_right = 24
theme_override_constants/margin_bottom = 5
[node name="Resume" type="Button" parent="PanelContainer/VBoxContainer/MarginContainer"]
[node name="Resume" type="Button" parent="PanelContainer/VBoxContainer"]
layout_mode = 2
text = "Resume"
[node name="MarginContainer2" type="MarginContainer" parent="PanelContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 24
theme_override_constants/margin_top = 5
theme_override_constants/margin_right = 24
theme_override_constants/margin_bottom = 5
[node name="Options" type="Button" parent="PanelContainer/VBoxContainer/MarginContainer2"]
[node name="Options" type="Button" parent="PanelContainer/VBoxContainer"]
layout_mode = 2
text = "Options"
[node name="MarginContainer3" type="MarginContainer" parent="PanelContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 24
theme_override_constants/margin_top = 5
theme_override_constants/margin_right = 24
theme_override_constants/margin_bottom = 5
[node name="QuitToMainMenu" type="Button" parent="PanelContainer/VBoxContainer/MarginContainer3"]
[node name="QuitToMainMenu" type="Button" parent="PanelContainer/VBoxContainer"]
layout_mode = 2
text = "Quit to main menu"
[node name="MarginContainer4" type="MarginContainer" parent="PanelContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 24
theme_override_constants/margin_top = 5
theme_override_constants/margin_right = 24
theme_override_constants/margin_bottom = 5
[node name="QuitToDesktop" type="Button" parent="PanelContainer/VBoxContainer/MarginContainer4"]
[node name="QuitToDesktop" type="Button" parent="PanelContainer/VBoxContainer"]
layout_mode = 2
text = "Quit to desktop"
[connection signal="pressed" from="PanelContainer/VBoxContainer/MarginContainer/Resume" to="." method="_on_resume_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/MarginContainer2/Options" to="." method="_on_options_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/MarginContainer3/QuitToMainMenu" to="." method="_on_quit_to_main_menu_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/MarginContainer4/QuitToDesktop" to="." method="_on_quit_to_desktop_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/Resume" to="." method="_on_resume_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/Options" to="." method="_on_options_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/QuitToMainMenu" to="." method="_on_quit_to_main_menu_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/QuitToDesktop" to="." method="_on_quit_to_desktop_pressed"]

View File

@ -3,8 +3,8 @@
[ext_resource type="Theme" uid="uid://b6a0ip4p72tgx" path="res://new_theme.tres" id="1_2aur6"]
[ext_resource type="PackedScene" uid="uid://dpt3kpixawyby" path="res://Scenes/UI/scoreboard.tscn" id="1_423py"]
[ext_resource type="Script" path="res://Scripts/singleplayer_lobby.gd" id="1_nd17k"]
[ext_resource type="PackedScene" uid="uid://3kcl30sump8c" path="res://Scenes/Menus/LoadoutEditor.tscn" id="2_wpyw5"]
[ext_resource type="PackedScene" uid="uid://ddmg342ff2qaq" path="res://Scenes/UI/chatbox.tscn" id="3_l8xy3"]
[ext_resource type="PackedScene" uid="uid://dqqitmhu66a7d" path="res://charselect.tscn" id="5_vg5y0"]
[node name="singleplayer_lobby" type="Control" node_paths=PackedStringArray("scoreboard", "loadout_editor", "chatbox")]
layout_mode = 3
@ -17,7 +17,7 @@ mouse_filter = 2
theme = ExtResource("1_2aur6")
script = ExtResource("1_nd17k")
scoreboard = NodePath("Scoreboard")
loadout_editor = NodePath("Panel")
loadout_editor = NodePath("Control")
chatbox = NodePath("Chatbox")
[node name="Scoreboard" parent="." instance=ExtResource("1_423py")]
@ -30,13 +30,6 @@ offset_left = -472.0
offset_right = -50.0
grow_horizontal = 0
[node name="Panel" parent="." instance=ExtResource("2_wpyw5")]
visible = false
layout_mode = 1
anchors_preset = -1
offset_left = 50.0
offset_right = 455.0
[node name="ReadyButton" type="Button" parent="."]
visible = false
layout_mode = 1
@ -56,5 +49,9 @@ text = "Ready"
[node name="Chatbox" parent="." instance=ExtResource("3_l8xy3")]
layout_mode = 1
[node name="Control" parent="." instance=ExtResource("5_vg5y0")]
visible = false
layout_mode = 1
[connection signal="pressed" from="ReadyButton" to="Scoreboard" method="set_player_ready_state" binds= [1, true]]
[connection signal="pressed" from="ReadyButton" to="ReadyButton" method="set_visible" binds= [false]]

View File

@ -23,14 +23,9 @@ layout_mode = 2
layout_mode = 2
placeholder_text = "Dummy Text"
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 30
theme_override_constants/margin_right = 30
[node name="Button" type="Button" parent="VBoxContainer/MarginContainer"]
[node name="Button" type="Button" parent="VBoxContainer"]
layout_mode = 2
text = "Confirm
"
[connection signal="pressed" from="VBoxContainer/MarginContainer/Button" to="." method="_on_button_pressed"]
[connection signal="pressed" from="VBoxContainer/Button" to="." method="_on_button_pressed"]

View File

@ -32,29 +32,27 @@ offset_bottom = 23.0
grow_horizontal = 2
text = "You WIN :3"
[node name="PlayButton" type="Button" parent="."]
[node name="HBoxContainer" type="HBoxContainer" parent="."]
layout_mode = 1
anchors_preset = -1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
offset_left = -312.0
offset_top = 331.0
offset_right = -157.0
offset_bottom = 369.0
anchor_bottom = 0.5
offset_left = -298.0
offset_top = -20.0
offset_right = 298.0
offset_bottom = 20.0
grow_horizontal = 2
grow_vertical = 2
[node name="PlayButton" type="Button" parent="HBoxContainer"]
layout_mode = 2
text = "play again :3"
[node name="QuitButton" type="Button" parent="."]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_right = 0.5
offset_left = 11.0
offset_top = 331.0
offset_right = 262.0
offset_bottom = 369.0
grow_horizontal = 2
[node name="QuitButton" type="Button" parent="HBoxContainer"]
layout_mode = 2
text = "quit to main menu :<"
[connection signal="pressed" from="PlayButton" to="." method="_on_play_button_pressed"]
[connection signal="pressed" from="QuitButton" to="." method="_on_quit_button_pressed"]
[connection signal="pressed" from="HBoxContainer/PlayButton" to="." method="_on_play_button_pressed"]
[connection signal="pressed" from="HBoxContainer/QuitButton" to="." method="_on_quit_button_pressed"]

47
Scenes/UI/hero_card.tscn Normal file
View File

@ -0,0 +1,47 @@
[gd_scene load_steps=8 format=3 uid="uid://bnsf2degj5tio"]
[ext_resource type="Script" path="res://hero_select_card.gd" id="1_rqutp"]
[ext_resource type="Texture2D" uid="uid://bskg4kgoi576f" path="res://Assets/Textures/Sprite-0001.png" id="2_gly1b"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ihqrr"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_l67bw"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_af3d2"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_00m4l"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_rg2u8"]
[node name="HeroCard" type="PanelContainer"]
custom_minimum_size = Vector2(360, 600)
offset_right = 360.0
offset_bottom = 600.0
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource("1_rqutp")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2
[node name="Label" type="Label" parent="VBoxContainer"]
layout_mode = 2
text = "Character name"
horizontal_alignment = 1
vertical_alignment = 1
[node name="TextureRect" type="TextureRect" parent="VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
texture = ExtResource("2_gly1b")
stretch_mode = 5
[node name="Button" type="Button" parent="."]
layout_mode = 2
theme_override_styles/normal = SubResource("StyleBoxEmpty_ihqrr")
theme_override_styles/hover = SubResource("StyleBoxEmpty_l67bw")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_af3d2")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_00m4l")
theme_override_styles/focus = SubResource("StyleBoxEmpty_rg2u8")
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]

View File

@ -20,13 +20,17 @@ albedo_color = Color(0.462745, 0.439216, 0.415686, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_t32n1"]
albedo_color = Color(0.462745, 0.439216, 0.415686, 1)
[node name="Node3D" type="StaticBody3D" node_paths=PackedStringArray("inventory", "block", "collider", "minimap_icon", "north_mesh", "south_mesh", "east_mesh", "west_mesh", "north_collider", "south_collider", "east_collider", "west_collider")]
[node name="Node3D" type="StaticBody3D" node_paths=PackedStringArray("inventory", "block", "collider", "minimap_icon", "north_icon", "south_icon", "east_icon", "west_icon", "north_mesh", "south_mesh", "east_mesh", "west_mesh", "north_collider", "south_collider", "east_collider", "west_collider")]
collision_layer = 17
script = ExtResource("1_tghvd")
inventory = NodePath("Inventory")
block = NodePath("MeshInstance3D")
collider = NodePath("CollisionShape3D")
minimap_icon = NodePath("MinimapIcon")
north_icon = NodePath("North/NorthMinimapIcon")
south_icon = NodePath("South/SouthMinimapIcon")
east_icon = NodePath("East/EastMinimapIcon")
west_icon = NodePath("West/WestMinimapIcon")
north_mesh = NodePath("North")
south_mesh = NodePath("South")
east_mesh = NodePath("East")

View File

@ -19,6 +19,12 @@ var enemy_names = []
@export var weapon_energy_bar : TextureProgressBar
@export var offhand_energy_bar : TextureProgressBar
@export var pickup_notif_scene : PackedScene
@export var wave_start_label : Label
var wave_start_label_shrinking := false
var wave_start_label_growing := false
var wave_start_label_acceleration := 200.0
var wave_start_label_speed := 0.0
func set_energy_visible(value):
@ -29,8 +35,39 @@ func set_offhand_energy_visible(value):
offhand_energy_bar.set_visible(value)
func _process(_delta: float) -> void:
func _process(delta: float) -> void:
fps_label.text = "FPS: " + str(Engine.get_frames_per_second())
wave_start_label.text = "Press [" + Data.player_keymap.ready.as_text_key_label() + "] to start wave"
if wave_start_label_growing:
wave_start_label.set_visible(true)
wave_start_label_speed += wave_start_label_acceleration * delta
wave_start_label.offset_left -= wave_start_label_speed * delta
wave_start_label.offset_right += wave_start_label_speed * delta
if wave_start_label.offset_left <= -300:
wave_start_label.offset_left = -300
wave_start_label.offset_right = 300
wave_start_label_growing = false
wave_start_label_speed = 0.0
if wave_start_label_shrinking:
wave_start_label_speed += wave_start_label_acceleration * delta
wave_start_label.offset_left += wave_start_label_speed * delta
wave_start_label.offset_right -= wave_start_label_speed * delta
if wave_start_label.offset_left >= 0:
wave_start_label.set_visible(false)
wave_start_label.offset_left = 0
wave_start_label.offset_right = 0
wave_start_label_shrinking = false
wave_start_label_speed = 0.0
func grow_wave_start_label():
wave_start_label_growing = true
wave_start_label_shrinking = false
func shrink_wave_start_label():
wave_start_label_shrinking = true
wave_start_label_growing = false
func set_hover_text(text):

View File

@ -31,7 +31,7 @@ func _ready() -> void:
player_keymap.apply()
characters.append(preload("res://PCs/Red/red.tres"))
characters.append(preload("res://PCs/Green/green.tres"))
#characters.append(preload("res://PCs/Green/green.tres"))
characters.append(preload("res://PCs/Blue/blue.tres"))
#Common

View File

@ -12,7 +12,7 @@ var enet_peer = ENetMultiplayerPeer.new()
@export var server_form : ServerForm
@export var scoreboard : Scoreboard
@export var loadout_editor : LoadoutEditor
@export var loadout_editor : HeroSelector
@export var chatbox : Chatbox
var alert_popup_scene = preload("res://Scenes/Menus/alert_popup.tscn")
var connected_players_profiles = {}
@ -68,8 +68,8 @@ func setup_game(peer_id):
setup_the_ui()
chatbox.username = Data.player_profile.display_name
Data.player_profile.display_name_changed.connect(chatbox.change_username)
loadout_editor.character_selected.connect(Data.player_profile.set_preferred_class)
loadout_editor.character_selected.connect(edit_player_profile)
loadout_editor.hero_selected.connect(Data.player_profile.set_preferred_class)
loadout_editor.hero_selected.connect(edit_player_profile)
connected_players_profiles[peer_id] = Data.player_profile
player_connected.emit(peer_id, Data.player_profile)

View File

@ -1,7 +1,7 @@
extends Control
@export var scoreboard : Scoreboard
@export var loadout_editor : LoadoutEditor
@export var loadout_editor : HeroSelector
@export var chatbox : Chatbox
var connected_players_profiles = {}
@ -23,8 +23,8 @@ func setup_game():
setup_the_ui()
chatbox.username = Data.player_profile.display_name
Data.player_profile.display_name_changed.connect(chatbox.change_username)
loadout_editor.character_selected.connect(Data.player_profile.set_preferred_class)
loadout_editor.character_selected.connect(edit_player_profile)
loadout_editor.hero_selected.connect(Data.player_profile.set_preferred_class)
loadout_editor.hero_selected.connect(edit_player_profile)
connected_players_profiles[1] = Data.player_profile

View File

@ -5,6 +5,10 @@ class_name TowerBase
@export var block : Node3D
@export var collider : CollisionShape3D
@export var minimap_icon : Sprite3D
@export var north_icon : Sprite3D
@export var south_icon : Sprite3D
@export var east_icon : Sprite3D
@export var west_icon : Sprite3D
@export var north_mesh : CSGBox3D
@export var south_mesh : CSGBox3D
@export var east_mesh : CSGBox3D
@ -73,6 +77,10 @@ func networked_spawn_tower(caller_id : int):
tower.owner_id = caller_id
tower.position = Vector3(0, 1.2, 0)
minimap_icon.modulate = Color.RED
north_icon.modulate = Color.RED
south_icon.modulate = Color.RED
west_icon.modulate = Color.RED
east_icon.modulate = Color.RED
add_child(tower)
@ -81,3 +89,7 @@ func networked_remove_tower():
tower.queue_free()
tower = null
minimap_icon.modulate = Color.GREEN
north_icon.modulate = Color.GREEN
south_icon.modulate = Color.GREEN
west_icon.modulate = Color.GREEN
east_icon.modulate = Color.GREEN

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=41 format=3 uid="uid://y1qa1g3ic8sp"]
[gd_scene load_steps=42 format=3 uid="uid://y1qa1g3ic8sp"]
[ext_resource type="Script" path="res://Scripts/level.gd" id="1_ws6nn"]
[ext_resource type="PackedScene" uid="uid://d2yv447trxkwt" path="res://Scenes/enemy_spawner.tscn" id="3_5imwp"]
@ -20,6 +20,7 @@
[ext_resource type="PackedScene" uid="uid://d3h3lmlf3hljl" path="res://Worlds/GreenPlanet/Decorations/bush.tscn" id="16_lhsvw"]
[ext_resource type="Texture2D" uid="uid://cnvndwp3q7rke" path="res://Assets/Textures/dirt.png" id="17_oq0rj"]
[ext_resource type="PackedScene" uid="uid://7g3jev3v6d3l" path="res://Scenes/shop_stand.tscn" id="19_h6brl"]
[ext_resource type="Texture2D" uid="uid://r202vo47jw1q" path="res://Assets/Textures/enemyhealth.png" id="21_flsqn"]
[sub_resource type="Curve3D" id="Curve3D_3rdl2"]
_data = {
@ -1099,4 +1100,16 @@ mesh = SubResource("QuadMesh_dyydf")
[node name="ShopStand" parent="." instance=ExtResource("19_h6brl")]
transform = Transform3D(0.675552, 0, -0.737313, 0, 1, 0, 0.737313, 0, 0.675552, 21.8477, 0.5, -5.74175)
[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(14.5, 0, 0, 0, -3.71547e-07, 1, 0, -8.5, -4.37114e-08, 0, 0.0347266, 0)
layers = 4
modulate = Color(0.498039, 0.498039, 0.498039, 1)
texture = ExtResource("21_flsqn")
[node name="Sprite3D2" type="Sprite3D" parent="."]
transform = Transform3D(14.5, 0, 0, 0, -2.756e-06, 1, 0, -63.05, -4.37114e-08, 0, -9.85039, 0)
layers = 4
modulate = Color(0.32549, 0.25098, 0.180392, 1)
texture = ExtResource("21_flsqn")
[connection signal="body_entered" from="EnemyGoal/Area3D" to="EnemyGoal" method="_on_area_3d_body_entered"]

File diff suppressed because one or more lines are too long

View File

@ -1,10 +1,10 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://de3eok2g4r2k"]
[resource]
content_margin_left = 5.0
content_margin_top = 2.0
content_margin_right = 5.0
content_margin_bottom = 2.0
content_margin_left = 50.0
content_margin_top = 3.0
content_margin_right = 50.0
content_margin_bottom = 3.0
bg_color = Color(0, 0, 0, 0.572549)
border_width_left = 2
border_width_top = 2
@ -12,7 +12,3 @@ border_width_right = 2
border_width_bottom = 2
border_color = Color(0.862745, 0.862745, 0.862745, 0.780392)
border_blend = true
expand_margin_left = 30.0
expand_margin_top = 2.0
expand_margin_right = 30.0
expand_margin_bottom = 5.0

15
charselect.gd Normal file
View File

@ -0,0 +1,15 @@
extends Control
class_name HeroSelector
signal hero_selected(hero_class)
@export var hero_card_scene: PackedScene
@export var hbox: HBoxContainer
func _ready() -> void:
for hero in Data.characters:
var card = hero_card_scene.instantiate()
card.set_hero(hero)
card.pressed.connect(func(x): hero_selected.emit(Data.characters.find(x)))
hbox.add_child(card)

38
charselect.tscn Normal file
View File

@ -0,0 +1,38 @@
[gd_scene load_steps=3 format=3 uid="uid://dqqitmhu66a7d"]
[ext_resource type="Script" path="res://charselect.gd" id="1_h2h26"]
[ext_resource type="PackedScene" uid="uid://bnsf2degj5tio" path="res://Scenes/UI/hero_card.tscn" id="1_v2mfo"]
[node name="Control" type="Control" node_paths=PackedStringArray("hbox")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
script = ExtResource("1_h2h26")
hero_card_scene = ExtResource("1_v2mfo")
hbox = NodePath("CenterContainer/VBoxContainer/HBoxContainer")
[node name="CenterContainer" type="CenterContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="CenterContainer/VBoxContainer"]
layout_mode = 2
text = "Choose your hero"
horizontal_alignment = 1
vertical_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/VBoxContainer"]
layout_mode = 2
alignment = 1

15
hero_select_card.gd Normal file
View File

@ -0,0 +1,15 @@
extends PanelContainer
signal pressed(hero_class)
var hero_class: HeroClass
func set_hero(hero: HeroClass):
hero_class = hero
$VBoxContainer/Label.text = hero.hero_name
$VBoxContainer/TextureRect.texture = hero.texture
func _on_button_pressed() -> void:
pressed.emit(hero_class)

View File

@ -1,10 +1,10 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://d34i78f4dnq2k"]
[resource]
content_margin_left = 5.0
content_margin_top = 2.0
content_margin_right = 5.0
content_margin_bottom = 2.0
content_margin_left = 50.0
content_margin_top = 3.0
content_margin_right = 50.0
content_margin_bottom = 3.0
bg_color = Color(0.615686, 0.615686, 0.615686, 0.572549)
border_width_left = 2
border_width_top = 2
@ -12,7 +12,3 @@ border_width_right = 2
border_width_bottom = 2
border_color = Color(0.168627, 0.168627, 0.168627, 0.780392)
border_blend = true
expand_margin_left = 30.0
expand_margin_top = 2.0
expand_margin_right = 30.0
expand_margin_bottom = 5.0