Separating features into separate scripts

This commit is contained in:
hz
2025-11-07 15:04:29 -06:00
parent 3da1f8a864
commit b997dae2af
2 changed files with 52 additions and 232 deletions
+24 -11
View File
@@ -1,15 +1,18 @@
[gd_scene load_steps=9 format=4 uid="uid://qd6xvgwrd00g"]
[gd_scene load_steps=12 format=4 uid="uid://qd6xvgwrd00g"]
[ext_resource type="Script" uid="uid://3goclr4srt7k" path="res://scenes/Grid/grid_plane_manager.gd" id="1_72cxc"]
[ext_resource type="Script" uid="uid://5p4mcxw7wann" path="res://scenes/Grid/grid_camera_controller.gd" id="2_o2iv9"]
[ext_resource type="Script" uid="uid://ehef5rrel4d6" path="res://scenes/Grid/grid_highlight_controller.gd" id="3_n2b7o"]
[ext_resource type="Script" uid="uid://oy8cl8dscrh2" path="res://scenes/Grid/day_night_controller.gd" id="4_u8bvi"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ground"]
albedo_color = Color(0.211765, 0.364706, 0.211765, 1)
[sub_resource type="PlaneMesh" id="PlaneMesh_ground"]
size = Vector2(10, 10)
size = Vector2(146.06345, 116.8072)
[sub_resource type="BoxShape3D" id="BoxShape3D_ground"]
size = Vector3(10, 0.4, 10)
size = Vector3(146.06345, 0.4, 116.8072)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_grid"]
no_depth_test = true
@@ -17,7 +20,7 @@ shading_mode = 0
vertex_color_use_as_albedo = true
albedo_color = Color(0.811765, 0.917647, 1, 0.74902)
[sub_resource type="ArrayMesh" id="ArrayMesh_q3k88"]
[sub_resource type="ArrayMesh" id="ArrayMesh_pxg5e"]
_surfaces = [{
"aabb": AABB(-5, 0.02, -5, 10, 1e-05, 10),
"attribute_data": PackedByteArray("M7L/pTOy/6Uzsv+lM7L/pTOy/6Uzsv+lM7L/pTOy/6Uzsv+lM7L/pTOy/6Uzsv+lM7L/pTOy/6Uzsv+lM7L/pTOy/6Uzsv+lM7L/pTOy/6Uzsv+lM7L/pTOy/6Uzsv+lM7L/pTOy/6Uzsv+lM7L/pTOy/6Uzsv+lM7L/pTOy/6Uzsv+lM7L/pTOy/6Uzsv+lM7L/pTOy/6Uzsv+lM7L/pTOy/6Uzsv+lM7L/pTOy/6U="),
@@ -34,7 +37,7 @@ no_depth_test = true
shading_mode = 0
albedo_color = Color(0.976471, 0.843137, 0.333333, 0.6)
[sub_resource type="PlaneMesh" id="PlaneMesh_8dkrf"]
[sub_resource type="PlaneMesh" id="PlaneMesh_dce6m"]
size = Vector2(1, 1)
[node name="GridField" type="Node3D"]
@@ -43,7 +46,7 @@ columns = 10
rows = 10
cell_size = 1.0
ground_thickness = 0.4
ground_padding = null
ground_padding = 20.0
show_grid_lines = true
grid_line_color = Color(0.2, 0.7, 1, 0.65)
@@ -63,22 +66,32 @@ shape = SubResource("BoxShape3D_ground")
unique_name_in_owner = true
material_override = SubResource("StandardMaterial3D_grid")
cast_shadow = 0
mesh = SubResource("ArrayMesh_q3k88")
mesh = SubResource("ArrayMesh_pxg5e")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(0.707107, -0.5, 0.5, 0, 0.707107, 0.707107, -0.707107, -0.5, 0.5, 0, 5, 0)
shadow_enabled = true
transform = Transform3D(-4.37114e-08, -1.0000001, -4.3711392e-08, 0, -4.3711392e-08, 1.0000001, -1.0000002, 4.3711392e-08, 1.9106857e-15, 5.165678e-06, 60, 9.1084837e-07)
light_color = Color(0.12, 0.18, 0.35, 1)
light_energy = 0.05
script = ExtResource("4_u8bvi")
grid_manager_path = NodePath("..")
[node name="Camera3D" type="Camera3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(0.70710677, -0.40824828, 0.57735026, 0, 0.8164966, 0.57735026, -0.70710677, -0.40824828, 0.57735026, 6, 6, 6)
transform = Transform3D(0.7071067, -0.40824828, 0.5773502, 0, 0.8164966, 0.5773502, -0.7071067, -0.40824828, 0.5773502, 6, 6, 6)
current = true
fov = 60.0
script = ExtResource("2_o2iv9")
grid_manager_path = NodePath("..")
ground_mesh_path = NodePath("../GroundMesh")
ground_collision_path = NodePath("../GroundBody/GroundCollision")
[node name="HoverHighlight" type="MeshInstance3D" parent="."]
unique_name_in_owner = true
visible = false
material_override = SubResource("StandardMaterial3D_highlight")
cast_shadow = 0
mesh = SubResource("PlaneMesh_8dkrf")
mesh = SubResource("PlaneMesh_dce6m")
script = ExtResource("3_n2b7o")
grid_manager_path = NodePath("..")
camera_path = NodePath("../Camera3D")