Plants now based on entity class

This commit is contained in:
Rendo 2025-07-07 16:55:48 +05:00
commit 08d593175b
14 changed files with 38 additions and 65 deletions

View file

@ -23,12 +23,12 @@ public partial class PoolContainer : Node2D
public static PoolContainer Instance { get; private set; }
public Dictionary<Vector2, IEntity>[] EntityField = { new(), new(), new() };
public Dictionary<Vector2, Entity>[] EntityField = { new(), new(), new() };
public override void _Ready()
{
Instance = this;
}
public bool TryGetEntity(Vector2 key, out IEntity result, int layer = 1)
public bool TryGetEntity(Vector2 key, out Entity result, int layer = 1)
{
if (EntityField[layer].ContainsKey(key))
{