game registry internal refactor
This commit is contained in:
parent
be2ebf1223
commit
d5573db251
11 changed files with 68 additions and 188 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue