feat: DONE!!! AAAAAAAAAAAAAAAAAAAAAA

main
Sara 2025-01-16 16:17:07 +01:00
parent be5a412008
commit 9f7dd2509d
18 changed files with 391 additions and 4 deletions

View File

@ -1,10 +1,22 @@
[gd_scene load_steps=5 format=3 uid="uid://c2kiuk2yxdlfr"]
[gd_scene load_steps=7 format=3 uid="uid://c2kiuk2yxdlfr"]
[ext_resource type="PackedScene" uid="uid://1kr3qqan3trk" path="res://objects/player.tscn" id="1_7kr4i"]
[ext_resource type="PackedScene" uid="uid://dm3355tbkvx24" path="res://objects/world.tscn" id="2_og5hb"]
[ext_resource type="PackedScene" uid="uid://0fykl1mw3c12" path="res://objects/enemy.tscn" id="3_ppe0x"]
[ext_resource type="PackedScene" uid="uid://c36u0cdxo4tqc" path="res://models/background/background.glb" id="4_gnobb"]
[sub_resource type="GDScript" id="GDScript_x2oc5"]
script/source = "extends Area3D
func _on_body_entered(body: Node3D) -> void:
if body is Player:
self.get_tree().change_scene_to_file(\"res://end_stage.tscn\")
"
[sub_resource type="BoxShape3D" id="BoxShape3D_dbwyx"]
size = Vector3(1, 2.76392, 2.47461)
[node name="Boot" type="Node3D"]
[node name="Player" parent="." instance=ExtResource("1_7kr4i")]
@ -51,3 +63,12 @@ transform = Transform3D(0.961593, 0, -0.27448, 0, 1, 0, 0.27448, 0, 0.961593, 52
[node name="Enemy12" parent="." instance=ExtResource("3_ppe0x")]
transform = Transform3D(0.961593, 0, -0.27448, 0, 1, 0, 0.27448, 0, 0.961593, 53.6498, -1.08325, -41.4631)
[node name="Area3D" type="Area3D" parent="."]
transform = Transform3D(0.881378, 0, 0.472412, 0, 1, 0, -0.472412, 0, 0.881378, 68.2421, 0, -40.2578)
script = SubResource("GDScript_x2oc5")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
shape = SubResource("BoxShape3D_dbwyx")
[connection signal="body_entered" from="Area3D" to="Area3D" method="_on_body_entered"]

87
godot/end_stage.tscn Normal file
View File

@ -0,0 +1,87 @@
[gd_scene load_steps=7 format=3 uid="uid://b5yryfphufmv3"]
[ext_resource type="Theme" uid="uid://posd5w7val31" path="res://ui_theme.tres" id="1_i5ifc"]
[ext_resource type="Texture2D" uid="uid://gtstcy53lh8a" path="res://ui/stage_end.png" id="1_ywcas"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8fa8h"]
bg_color = Color(0, 0, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_eppu6"]
bg_color = Color(0.290196, 0.290196, 0.290196, 0.686275)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
expand_margin_left = 30.0
expand_margin_top = 10.0
expand_margin_right = 30.0
expand_margin_bottom = 30.0
[sub_resource type="LabelSettings" id="LabelSettings_tbjkf"]
font_size = 70
[sub_resource type="GDScript" id="GDScript_5hsxl"]
script/source = "extends Button
func _on_pressed() -> void:
self.get_tree().call_deferred(\"change_scene_to_file\", \"res://main_menu.tscn\")
"
[node name="Control" type="AspectRatioContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_i5ifc")
ratio = 1.7778
[node name="Panel" type="Panel" parent="."]
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_8fa8h")
[node name="TextureRect" type="TextureRect" parent="."]
layout_mode = 2
texture = ExtResource("1_ywcas")
expand_mode = 1
stretch_mode = 5
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 0
theme_override_constants/margin_left = 148
theme_override_constants/margin_top = 155
[node name="CenterContainer" type="CenterContainer" parent="MarginContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
[node name="PanelContainer" type="PanelContainer" parent="MarginContainer/CenterContainer"]
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_eppu6")
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/CenterContainer/PanelContainer"]
layout_mode = 2
theme_override_constants/separation = 18
[node name="Label" type="Label" parent="MarginContainer/CenterContainer/PanelContainer/VBoxContainer"]
layout_mode = 2
text = "Stage End!"
label_settings = SubResource("LabelSettings_tbjkf")
[node name="Button2" type="Button" parent="MarginContainer/CenterContainer/PanelContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 0
focus_previous = NodePath(".")
text = "Exit"
script = SubResource("GDScript_5hsxl")
[node name="Timer" type="Timer" parent="MarginContainer/CenterContainer/PanelContainer/VBoxContainer/Button2"]
wait_time = 1.5
one_shot = true
autostart = true
[connection signal="pressed" from="MarginContainer/CenterContainer/PanelContainer/VBoxContainer/Button2" to="MarginContainer/CenterContainer/PanelContainer/VBoxContainer/Button2" method="_on_pressed"]
[connection signal="timeout" from="MarginContainer/CenterContainer/PanelContainer/VBoxContainer/Button2/Timer" to="MarginContainer/CenterContainer/PanelContainer/VBoxContainer/Button2" method="grab_focus"]

View File

@ -233,3 +233,21 @@ transform = Transform3D(0.993801, 0, -0.111174, 0, 1, 0, 0.111174, 0, 0.993801,
[node name="sandbag_wall_halfheight3" parent="." instance=ExtResource("9_k4emc")]
transform = Transform3D(0.956003, 0, -0.293356, 0, 1, 0, 0.293356, 0, 0.956003, -9.32792, 0.836533, 3.28513)
[node name="Label3D" type="Label3D" parent="."]
transform = Transform3D(0.705896, 0.0556231, -0.706128, 0, 0.996912, 0.0785287, 0.708315, -0.0554331, 0.703716, -6.28217, 2.01057, 1.24193)
text = "Press forward on the left stick to walk.
Rapidly press A to run."
horizontal_alignment = 0
[node name="Label3D2" type="Label3D" parent="."]
transform = Transform3D(0.999847, 0, 0.0174873, 0, 1, 0, -0.0174873, 0, 0.999847, -8.28895, 2.34045, -4.15506)
text = "Turn the camera
with the right stick."
horizontal_alignment = 0
[node name="Label3D3" type="Label3D" parent="."]
transform = Transform3D(-0.0179934, 0, -0.999838, 0, 1, 0, 0.999838, 0, -0.0179934, -3.18639, 2.62508, -4.25456)
text = "Press X to attack with your bayonet."
horizontal_alignment = 0

View File

@ -440,3 +440,18 @@ transform = Transform3D(-0.812226, 0, 0.583343, 0, 1, 0, -0.583343, 0, -0.812226
[node name="sandbag_wall_halfheight" parent="." instance=ExtResource("15_rcmq2")]
transform = Transform3D(0.938409, 0, 0.345527, 0, 1, 0, -0.345527, 0, 0.938409, 6.67229, 0.532771, -16.2797)
[node name="Label3D" type="Label3D" parent="."]
transform = Transform3D(0.711254, 0, -0.702936, 0, 1, 0, 0.702936, 0, 0.711254, -0.169304, 2.02161, -16.2403)
double_sided = false
text = "Swap the camera position
by pressing down the left stick"
horizontal_alignment = 0
[node name="Label3D2" type="Label3D" parent="."]
transform = Transform3D(0.565514, 0, -0.824739, 0, 1, 0, 0.824739, 0, 0.565514, 8.32611, 1.97134, -22.4362)
double_sided = false
text = "Fire your rifle
by pulling back the left stick
and pressing X"
horizontal_alignment = 0

Binary file not shown.

Binary file not shown.

112
godot/main_menu.tscn Normal file
View File

@ -0,0 +1,112 @@
[gd_scene load_steps=8 format=3 uid="uid://pgi5rny8vjn4"]
[ext_resource type="Theme" uid="uid://posd5w7val31" path="res://ui_theme.tres" id="1_h4bo5"]
[ext_resource type="Texture2D" uid="uid://c0gsyl61wtg8s" path="res://ui/level_select.png" id="2_8es0c"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_t5qe0"]
bg_color = Color(0, 0, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_isjvw"]
bg_color = Color(0.290196, 0.290196, 0.290196, 0.686275)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
expand_margin_left = 30.0
expand_margin_top = 10.0
expand_margin_right = 30.0
expand_margin_bottom = 30.0
[sub_resource type="LabelSettings" id="LabelSettings_oxg04"]
font_size = 70
[sub_resource type="GDScript" id="GDScript_krtn0"]
script/source = "extends Button
@export var game_scene := \"res://boot.tscn\"
func _ready() -> void:
self.grab_focus()
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
func _on_pressed() -> void:
self.get_tree().call_deferred(\"change_scene_to_file\", game_scene)
"
[sub_resource type="GDScript" id="GDScript_iytxh"]
script/source = "extends Button
func _on_pressed() -> void:
self.get_tree().quit()
"
[node name="Control" type="AspectRatioContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_h4bo5")
ratio = 1.7778
[node name="Panel" type="Panel" parent="."]
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_t5qe0")
[node name="MarginContainer2" type="MarginContainer" parent="."]
layout_mode = 2
[node name="TextureRect" type="TextureRect" parent="MarginContainer2"]
texture_filter = 2
layout_mode = 2
texture = ExtResource("2_8es0c")
expand_mode = 2
stretch_mode = 5
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 0
theme_override_constants/margin_left = 148
theme_override_constants/margin_top = 155
[node name="CenterContainer" type="CenterContainer" parent="MarginContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
[node name="PanelContainer" type="PanelContainer" parent="MarginContainer/CenterContainer"]
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_isjvw")
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/CenterContainer/PanelContainer"]
layout_mode = 2
theme_override_constants/separation = 18
[node name="Label" type="Label" parent="MarginContainer/CenterContainer/PanelContainer/VBoxContainer"]
layout_mode = 2
text = "Agoraphobia"
label_settings = SubResource("LabelSettings_oxg04")
[node name="Button" type="Button" parent="MarginContainer/CenterContainer/PanelContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 0
focus_neighbor_top = NodePath("../Button2")
focus_neighbor_bottom = NodePath("../Button2")
focus_next = NodePath("../Button2")
focus_previous = NodePath("../Button2")
text = "Start Game"
script = SubResource("GDScript_krtn0")
[node name="Button2" type="Button" parent="MarginContainer/CenterContainer/PanelContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 0
focus_neighbor_top = NodePath("../Button")
focus_neighbor_bottom = NodePath("../Button")
focus_next = NodePath("../Button")
focus_previous = NodePath(".")
text = "Quit"
script = SubResource("GDScript_iytxh")
[connection signal="pressed" from="MarginContainer/CenterContainer/PanelContainer/VBoxContainer/Button" to="MarginContainer/CenterContainer/PanelContainer/VBoxContainer/Button" method="_on_pressed"]
[connection signal="pressed" from="MarginContainer/CenterContainer/PanelContainer/VBoxContainer/Button2" to="MarginContainer/CenterContainer/PanelContainer/VBoxContainer/Button2" method="_on_pressed"]

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -15,7 +15,7 @@ warnings/check_invalid_track_paths=false
[application]
config/name="trenches"
run/main_scene="res://boot.tscn"
run/main_scene="res://main_menu.tscn"
config/features=PackedStringArray("4.3", "Forward Plus")
config/icon="res://icon.svg"
@ -34,6 +34,14 @@ version_control/autoload_on_startup=true
[input]
ui_accept={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194309,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194310,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null)
]
}
dir_forward={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)

BIN
godot/ui/level_select.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c0gsyl61wtg8s"
path="res://.godot/imported/level_select.png-5673e6c39770bd910570b273c60a6fb4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://ui/level_select.png"
dest_files=["res://.godot/imported/level_select.png-5673e6c39770bd910570b273c60a6fb4.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
godot/ui/level_select.png~ Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 MiB

BIN
godot/ui/stage_end.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://gtstcy53lh8a"
path="res://.godot/imported/stage_end.png-c4abccc40416e2c0e83f7cef83a582dc.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://ui/stage_end.png"
dest_files=["res://.godot/imported/stage_end.png-c4abccc40416e2c0e83f7cef83a582dc.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

49
godot/ui_theme.tres Normal file
View File

@ -0,0 +1,49 @@
[gd_resource type="Theme" load_steps=4 format=3 uid="uid://posd5w7val31"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pdlhj"]
content_margin_left = 5.0
content_margin_top = 10.0
content_margin_right = 5.0
content_margin_bottom = 10.0
bg_color = Color(0.188193, 0.201299, 0.185376, 1)
border_width_left = 3
border_width_bottom = 3
border_color = Color(0.221962, 0.235242, 0.188787, 1)
corner_radius_top_left = 2
corner_radius_top_right = 2
corner_radius_bottom_right = 2
corner_radius_bottom_left = 2
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pfg3w"]
content_margin_left = 50.0
content_margin_top = 10.0
content_margin_right = 50.0
content_margin_bottom = 10.0
bg_color = Color(0.24092, 0.289552, 0.230467, 1)
border_width_left = 3
border_width_bottom = 3
border_color = Color(0.221962, 0.235242, 0.188787, 1)
corner_radius_top_left = 2
corner_radius_top_right = 2
corner_radius_bottom_right = 2
corner_radius_bottom_left = 2
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rtn4q"]
content_margin_left = 5.0
content_margin_top = 10.0
content_margin_right = 5.0
content_margin_bottom = 10.0
bg_color = Color(0.216179, 0.275974, 0.203325, 1)
border_width_left = 3
border_width_bottom = 3
border_color = Color(0.221962, 0.235242, 0.188787, 1)
corner_radius_top_left = 2
corner_radius_top_right = 2
corner_radius_bottom_right = 2
corner_radius_bottom_left = 2
[resource]
Button/font_sizes/font_size = 30
Button/styles/hover = SubResource("StyleBoxFlat_pdlhj")
Button/styles/normal = SubResource("StyleBoxFlat_pfg3w")
Button/styles/pressed = SubResource("StyleBoxFlat_rtn4q")

BIN
models/textures/level_select.kra (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.