Plants now based on entity class
This commit is contained in:
parent
6c9909df30
commit
08d593175b
14 changed files with 38 additions and 65 deletions
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue