Fixing daynight cycle, and adding character home

This commit is contained in:
hz
2025-11-08 16:38:03 -06:00
parent d37ef6c0b9
commit 00be758651
6 changed files with 200 additions and 19 deletions
+41 -18
View File
@@ -1,19 +1,21 @@
[gd_scene load_steps=14 format=4 uid="uid://qd6xvgwrd00g"]
[gd_scene load_steps=17 format=4 uid="uid://qd6xvgwrd00g"]
[ext_resource type="Script" path="res://scenes/Grid/grid_plane_manager.gd" id="1_72cxc"]
[ext_resource type="Script" path="res://scenes/Grid/grid_camera_controller.gd" id="2_o2iv9"]
[ext_resource type="Script" path="res://scenes/Grid/grid_highlight_controller.gd" id="3_n2b7o"]
[ext_resource type="Script" path="res://scenes/Grid/day_night_controller.gd" id="4_u8bvi"]
[ext_resource type="Script" path="res://scenes/Grid/grid_character_controller.gd" id="5_n4d0h"]
[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"]
[ext_resource type="Script" uid="uid://6asq70b60kif" path="res://scenes/Grid/grid_character_controller.gd" id="5_n4d0h"]
[ext_resource type="Script" uid="uid://24uoe7hanwp2" path="res://scenes/Grid/time_display.gd" id="6_8n3rl"]
[ext_resource type="PackedScene" path="res://scenes/Grid/grid_home_marker.tscn" id="7_1vmu7"]
[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(146.06345, 116.8072)
size = Vector2(166.33133, 166.33133)
[sub_resource type="BoxShape3D" id="BoxShape3D_ground"]
size = Vector3(146.06345, 0.4, 116.8072)
size = Vector3(166.33133, 0.4, 166.33133)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_grid"]
no_depth_test = true
@@ -21,7 +23,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_pxg5e"]
[sub_resource type="ArrayMesh" id="ArrayMesh_ot7o0"]
_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="),
@@ -38,15 +40,15 @@ no_depth_test = true
shading_mode = 0
albedo_color = Color(0.976471, 0.843137, 0.333333, 0.6)
[sub_resource type="PlaneMesh" id="PlaneMesh_dce6m"]
[sub_resource type="PlaneMesh" id="PlaneMesh_1wejn"]
size = Vector2(1, 1)
[sub_resource type="SphereMesh" id="SphereMesh_character"]
radius = 0.35
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_character"]
albedo_color = Color(0.941176, 0.403922, 0.262745, 1)
[sub_resource type="SphereMesh" id="SphereMesh_character"]
radius = 0.35
[node name="GridField" type="Node3D"]
script = ExtResource("1_72cxc")
columns = 10
@@ -73,15 +75,17 @@ shape = SubResource("BoxShape3D_ground")
unique_name_in_owner = true
material_override = SubResource("StandardMaterial3D_grid")
cast_shadow = 0
mesh = SubResource("ArrayMesh_pxg5e")
mesh = SubResource("ArrayMesh_ot7o0")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
unique_name_in_owner = 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)
transform = Transform3D(1.0000002, 1.306986e-15, 5.713018e-23, 0, -4.3711392e-08, 1.0000001, 1.3069862e-15, -1.0000001, -4.3711392e-08, 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("..")
day_length_hours = 24.0
real_seconds_per_game_hour = 5.0
[node name="Camera3D" type="Camera3D" parent="."]
unique_name_in_owner = true
@@ -98,19 +102,38 @@ unique_name_in_owner = true
visible = false
material_override = SubResource("StandardMaterial3D_highlight")
cast_shadow = 0
mesh = SubResource("PlaneMesh_dce6m")
mesh = SubResource("PlaneMesh_1wejn")
script = ExtResource("3_n2b7o")
grid_manager_path = NodePath("..")
camera_path = NodePath("../Camera3D")
[node name="GridCharacter" type="Node3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.5, 0.3, -4.5)
script = ExtResource("5_n4d0h")
grid_manager_path = NodePath("..")
camera_path = NodePath("../Camera3D")
start_cell = Vector2i(0, 0)
move_speed = 5.0
home_marker_scene = ExtResource("7_1vmu7")
[node name="Mesh" type="MeshInstance3D" parent="GridCharacter"]
mesh = SubResource("SphereMesh_character")
material_override = SubResource("StandardMaterial3D_character")
mesh = SubResource("SphereMesh_character")
[node name="HUD" type="CanvasLayer" parent="."]
[node name="TimeLabel" type="Label" parent="HUD"]
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -220.0
offset_top = 20.0
offset_right = -20.0
offset_bottom = 60.0
grow_horizontal = 0
theme_override_font_sizes/font_size = 28
text = "06:00"
horizontal_alignment = 2
vertical_alignment = 1
script = ExtResource("6_8n3rl")
day_night_controller_path = NodePath("../../DirectionalLight3D")