UI work, placing traps, removing traps, disarming traps, new sound fx.

This commit is contained in:
2025-12-25 17:52:30 -05:00
parent 3b6407d6e5
commit 55eb37ca74
34 changed files with 867 additions and 72 deletions

View File

@@ -0,0 +1,11 @@
[gd_scene load_steps=3 format=3 uid="uid://c5ienwpgidanx"]
[ext_resource type="Texture2D" uid="uid://bxs0jj4y4clvv" path="res://visuals/images/icons/detect button.png" id="1_tmc0a"]
[ext_resource type="Texture2D" uid="uid://bxxm3c2lpmr4f" path="res://visuals/images/icons/lit detect button.png" id="2_75gk1"]
[node name="DisarmIcon" type="TextureButton"]
custom_minimum_size = Vector2(32, 32)
texture_normal = ExtResource("1_tmc0a")
texture_pressed = ExtResource("2_75gk1")
ignore_texture_size = true
stretch_mode = 0

View File

@@ -0,0 +1,110 @@
[gd_scene load_steps=4 format=3 uid="uid://v12wymuy2xk6"]
[ext_resource type="Script" uid="uid://5nrsscwod1xg" path="res://scripts/disarm_trap_modal.gd" id="1_eo0gq"]
[ext_resource type="Texture2D" uid="uid://barbcaa2xvgkk" path="res://visuals/images/icons/switch button.png" id="2_cgabh"]
[ext_resource type="Texture2D" uid="uid://diyks5oxgidoo" path="res://visuals/images/icons/ranged attack button.png" id="3_06srb"]
[node name="DisarmTrapModal" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_eo0gq")
[node name="ConfirmationDialog" type="ConfirmationDialog" parent="."]
unique_name_in_owner = true
oversampling_override = 1.0
initial_position = 1
visible = true
transient = false
borderless = true
always_on_top = true
unfocusable = true
ok_button_text = "Disarm"
dialog_text = "Disarm Trap?"
[node name="Control" type="Control" parent="ConfirmationDialog"]
layout_mode = 3
anchors_preset = 0
offset_left = 8.0
offset_top = 8.0
offset_right = 192.0
offset_bottom = 51.0
[node name="TextureRect" type="TextureRect" parent="ConfirmationDialog/Control"]
z_index = 10
layout_mode = 0
offset_left = 36.0
offset_top = 29.0
offset_right = 68.0
offset_bottom = 61.0
texture = ExtResource("2_cgabh")
expand_mode = 1
[node name="TextureRect2" type="TextureRect" parent="ConfirmationDialog/Control"]
z_index = 10
layout_mode = 0
offset_left = 120.0
offset_top = 29.0
offset_right = 152.0
offset_bottom = 61.0
texture = ExtResource("3_06srb")
expand_mode = 1
[node name="Timer" type="Timer" parent="."]
unique_name_in_owner = true
[node name="DisarmSound" type="AudioStreamPlayer" parent="."]
[node name="SuccessSound" type="AudioStreamPlayer" parent="."]
[node name="AudioStreamPlayer3" type="AudioStreamPlayer" parent="."]
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="DisarmWindow" type="PanelContainer" parent="CanvasLayer"]
unique_name_in_owner = true
visible = false
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -96.0
offset_top = -56.0
offset_right = 96.0
offset_bottom = 56.0
grow_horizontal = 2
grow_vertical = 2
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/DisarmWindow"]
layout_mode = 2
alignment = 1
[node name="PressToDisarmHeader" type="Label" parent="CanvasLayer/DisarmWindow/VBoxContainer"]
layout_mode = 2
text = "PRESS TO DISARM"
horizontal_alignment = 1
[node name="Panel" type="PanelContainer" parent="CanvasLayer/DisarmWindow/VBoxContainer"]
layout_mode = 2
[node name="DisarmContainer" type="HBoxContainer" parent="CanvasLayer/DisarmWindow/VBoxContainer/Panel"]
unique_name_in_owner = true
layout_mode = 2
alignment = 1
[node name="TimeRemainingLabel" type="Label" parent="CanvasLayer/DisarmWindow/VBoxContainer"]
layout_mode = 2
text = "TIME REMAINING: "
horizontal_alignment = 1
[node name="TimerLabel" type="Label" parent="CanvasLayer/DisarmWindow/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "00.000"
horizontal_alignment = 1
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]

10
templates/one_shot.tscn Normal file
View File

@@ -0,0 +1,10 @@
[gd_scene load_steps=2 format=3 uid="uid://cmw77i7e7jxkn"]
[ext_resource type="Script" uid="uid://cb72nk0ddi3c" path="res://scripts/one_shot.gd" id="1_k1ss2"]
[node name="OneShot" type="AudioStreamPlayer"]
script = ExtResource("1_k1ss2")
[node name="Timer" type="Timer" parent="."]
[connection signal="timeout" from="Timer" to="." method="_on_timeout"]

View File

@@ -0,0 +1,51 @@
[gd_scene load_steps=4 format=3 uid="uid://bwj76wt4pab4t"]
[ext_resource type="Script" uid="uid://bj1udbw3sm73f" path="res://scripts/remove_trap_modal.gd" id="1_27jge"]
[ext_resource type="Texture2D" uid="uid://barbcaa2xvgkk" path="res://visuals/images/icons/switch button.png" id="2_dmpk7"]
[ext_resource type="Texture2D" uid="uid://diyks5oxgidoo" path="res://visuals/images/icons/ranged attack button.png" id="3_42gya"]
[node name="RemoveTrapModal" type="ConfirmationDialog"]
handle_input_locally = false
canvas_item_default_texture_filter = 2
gui_disable_input = true
oversampling_override = 1.0
title = "Remove Trap?"
initial_position = 1
visible = true
transient = false
borderless = true
always_on_top = true
unfocusable = true
content_scale_mode = 1
content_scale_aspect = 2
ok_button_text = "Remove"
dialog_text = "Remove Trap?"
script = ExtResource("1_27jge")
[node name="Control" type="Control" parent="."]
layout_mode = 3
anchors_preset = 0
offset_left = 8.0
offset_top = 8.0
offset_right = 192.0
offset_bottom = 51.0
[node name="TextureRect" type="TextureRect" parent="Control"]
z_index = 10
layout_mode = 0
offset_left = 36.0
offset_top = 29.0
offset_right = 68.0
offset_bottom = 61.0
texture = ExtResource("2_dmpk7")
expand_mode = 1
[node name="TextureRect2" type="TextureRect" parent="Control"]
z_index = 10
layout_mode = 0
offset_left = 120.0
offset_top = 29.0
offset_right = 152.0
offset_bottom = 61.0
texture = ExtResource("3_42gya")
expand_mode = 1

View File

@@ -1,7 +1,8 @@
[gd_scene load_steps=6 format=3 uid="uid://c8xf3qawk5c6u"]
[gd_scene load_steps=7 format=3 uid="uid://c8xf3qawk5c6u"]
[ext_resource type="Script" uid="uid://bcs7ygh6s3l35" path="res://scripts/player.gd" id="1_a5wj7"]
[ext_resource type="Script" uid="uid://6w608y2grdqb" path="res://scripts/player_data.gd" id="2_sfa2f"]
[ext_resource type="AudioStream" uid="uid://cjrlb4qiy23sj" path="res://audio/sounds/impact_deep_thud_bounce_09.wav" id="3_sfa2f"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_y646j"]
albedo_color = Color(0.08468992, 0.08468992, 0.08468992, 1)
@@ -38,3 +39,9 @@ shape = SubResource("CapsuleShape3D_a5wj7")
[node name="Data" type="Node" parent="."]
script = ExtResource("2_sfa2f")
[node name="TrapSound" type="AudioStreamPlayer3D" parent="."]
stream = ExtResource("3_sfa2f")
[node name="AudioListener3D" type="AudioListener3D" parent="."]
current = true

43
templates/trap.tscn Normal file
View File

@@ -0,0 +1,43 @@
[gd_scene load_steps=7 format=3 uid="uid://bk3yqawritfnj"]
[ext_resource type="Script" uid="uid://yjsgte3x7jjw" path="res://scripts/trap.gd" id="1_6h4aj"]
[ext_resource type="ArrayMesh" uid="uid://bih57xe642hrc" path="res://models/trap.obj" id="2_oj6ox"]
[ext_resource type="Texture2D" uid="uid://cmlp8tn6mnbd" path="res://visuals/images/icons/t-bomb.png" id="3_mxvh5"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_qcd3b"]
albedo_color = Color(0, 0, 1, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_88ety"]
resource_local_to_scene = true
albedo_color = Color(1, 1, 0, 1)
[sub_resource type="BoxShape3D" id="BoxShape3D_dw7u0"]
size = Vector3(0.8, 1, 0.8)
[node name="Trap" type="Area3D"]
script = ExtResource("1_6h4aj")
[node name="Model" type="MeshInstance3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(0.25, 0, 0, 0, 0.25, 0, 0, 0, 0.25, 0, 0, 0)
material_overlay = SubResource("StandardMaterial3D_qcd3b")
mesh = ExtResource("2_oj6ox")
skeleton = NodePath("")
surface_material_override/0 = SubResource("StandardMaterial3D_88ety")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
shape = SubResource("BoxShape3D_dw7u0")
[node name="Icon" type="Sprite3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0)
pixel_size = 0.0075
axis = 1
double_sided = false
texture = ExtResource("3_mxvh5")
[node name="RevealTimer" type="Timer" parent="."]
unique_name_in_owner = true
[connection signal="timeout" from="RevealTimer" to="." method="_on_reveal_timeout"]