Player-field manipulations
This commit is contained in:
parent
9ced321538
commit
74759e9e16
21 changed files with 270 additions and 54 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue