Managed the freeing of entityplacers. Also cleaned up EntityManager

This commit is contained in:
Katharina Ziolkowski
2026-02-03 15:36:59 +01:00
parent bcbc074c86
commit b65a3bbd6d
8 changed files with 92 additions and 39 deletions
@@ -13,10 +13,10 @@ public class TrashEntity : PositionalEntity
{
}
public override void AddEntity(Node2D parent)
public override void InstantiateEntityNode(Node2D parent)
{
if(_creator == null) _creator = EntityManager.Instance.NodeCreator;
var entityNode = _creator.CreateNode2D(EntityType);
var entityNode = _creator.InstantiateNode(EntityType);
parent.AddChild(entityNode);
entityNode.GlobalPosition = position;
}