♻️ Rebuild with DI

This commit is contained in:
2025-08-31 01:44:18 +08:00
parent 1cc941d893
commit c72353716f
13 changed files with 95 additions and 36 deletions

View File

@@ -1,8 +1,5 @@
[gd_scene load_steps=9 format=3 uid="uid://c22aprj452aha"]
[gd_scene load_steps=6 format=3 uid="uid://c22aprj452aha"]
[ext_resource type="Script" uid="uid://cudpc3w17mbsw" path="res://Scripts/System/GridManager.cs" id="1_knkkn"]
[ext_resource type="Script" uid="uid://dfi2snip78eq6" path="res://Scripts/System/ResourceManager.cs" id="1_pl8e4"]
[ext_resource type="Script" uid="uid://cfbj72nm0eovg" path="res://Scripts/System/BuildingRegistry.cs" id="1_sxhdm"]
[ext_resource type="Script" uid="uid://cugfbvw70clgd" path="res://Scripts/System/NaturalResourceGenerator.cs" id="2_oss8w"]
[ext_resource type="Script" uid="uid://bx1wj7gn6vrqe" path="res://Scripts/System/PlacementManager.cs" id="2_sxhdm"]
[ext_resource type="PackedScene" uid="uid://doxy60afddg1m" path="res://Scenes/Entities/Player.tscn" id="3_oss8w"]
@@ -11,29 +8,15 @@
[node name="Root" type="Node2D"]
[node name="ResourceSystem" type="Node" parent="."]
script = ExtResource("1_pl8e4")
[node name="BuildingRegistry" type="Node" parent="."]
script = ExtResource("1_sxhdm")
[node name="NaturalResourceGenerator" type="Node2D" parent="." node_paths=PackedStringArray("Grid", "Registry")]
[node name="NaturalResourceGenerator" type="Node2D" parent="."]
script = ExtResource("2_oss8w")
Grid = NodePath("../GridSystem")
Registry = NodePath("../BuildingRegistry")
[node name="GridSystem" type="Node2D" parent="."]
script = ExtResource("1_knkkn")
[node name="PlacementSystem" type="Node2D" parent="." node_paths=PackedStringArray("Grid", "Inventory", "Registry")]
[node name="PlacementSystem" type="Node2D" parent="."]
script = ExtResource("2_sxhdm")
Grid = NodePath("../GridSystem")
Inventory = NodePath("../ResourceSystem")
Registry = NodePath("../BuildingRegistry")
[node name="Player" parent="." node_paths=PackedStringArray("Inventory") instance=ExtResource("3_oss8w")]
scale = Vector2(0.35, 0.35)
Inventory = NodePath("../ResourceSystem")
Inventory = NodePath("")
[node name="HUD" parent="." instance=ExtResource("8_hud_scene")]