Added a character that will move to the cell that is left clicked on

This commit is contained in:
hz
2025-11-07 16:35:25 -06:00
parent b997dae2af
commit ab89478f2d
+24 -5
View File
@@ -1,9 +1,10 @@
[gd_scene load_steps=12 format=4 uid="uid://qd6xvgwrd00g"] [gd_scene load_steps=14 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" 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" 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" 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" 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"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ground"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ground"]
albedo_color = Color(0.211765, 0.364706, 0.211765, 1) albedo_color = Color(0.211765, 0.364706, 0.211765, 1)
@@ -40,6 +41,12 @@ albedo_color = Color(0.976471, 0.843137, 0.333333, 0.6)
[sub_resource type="PlaneMesh" id="PlaneMesh_dce6m"] [sub_resource type="PlaneMesh" id="PlaneMesh_dce6m"]
size = Vector2(1, 1) 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)
[node name="GridField" type="Node3D"] [node name="GridField" type="Node3D"]
script = ExtResource("1_72cxc") script = ExtResource("1_72cxc")
columns = 10 columns = 10
@@ -95,3 +102,15 @@ mesh = SubResource("PlaneMesh_dce6m")
script = ExtResource("3_n2b7o") script = ExtResource("3_n2b7o")
grid_manager_path = NodePath("..") grid_manager_path = NodePath("..")
camera_path = NodePath("../Camera3D") camera_path = NodePath("../Camera3D")
[node name="GridCharacter" type="Node3D" parent="."]
unique_name_in_owner = true
script = ExtResource("5_n4d0h")
grid_manager_path = NodePath("..")
camera_path = NodePath("../Camera3D")
start_cell = Vector2i(0, 0)
move_speed = 5.0
[node name="Mesh" type="MeshInstance3D" parent="GridCharacter"]
mesh = SubResource("SphereMesh_character")
material_override = SubResource("StandardMaterial3D_character")