game registry internal refactor

This commit is contained in:
Rendo 2025-07-25 18:02:47 +05:00
commit d5573db251
11 changed files with 68 additions and 188 deletions

View file

@ -1,4 +1,5 @@
using Godot;
using Newlon;
using Newlon.Components;
using Newlon.Components.Level;
using Newlon.Components.Plants;
@ -37,7 +38,7 @@ public partial class InitialPackedSceneSpawner : Node
{
PoolContainer.Instance.Plants.AddChild(plant);
node.GlobalPosition = position;
plant.Resource = GameRegistry.GetPlantByName(plant.internal_id);
plant.Resource = GameRegistry.GetEntityByName(plant.internal_id) as PlantResource;
PoolContainer.Instance.EntityField[plant.Resource.Layer].Add(plant.GlobalPosition, plant);
}
else