Player-field manipulations

This commit is contained in:
Фёдор Веселов 2024-09-15 19:19:59 +05:00
commit 74759e9e16
21 changed files with 270 additions and 54 deletions

View file

@ -15,6 +15,7 @@ public partial class RuntimePlantData : Node2D, IEntity
public int Hp => _hp;
public int MaxHp => _maxHP;
public int Line => _line;
public int Layer;
public override void _Ready()
{
@ -37,6 +38,7 @@ public partial class RuntimePlantData : Node2D, IEntity
if (_hp <= 0)
{
LevelController.Instance.Pools.EntityField[Layer].Remove(GlobalPosition);
QueueFree();
}
}