loose menu
This commit is contained in:
parent
6608fb8389
commit
a6f817efbc
17 changed files with 369 additions and 52 deletions
17
scripts/components/plants/LoseZone.cs
Normal file
17
scripts/components/plants/LoseZone.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using Godot;
|
||||
|
||||
namespace Newlon.Components.Plants;
|
||||
|
||||
public partial class LoseZone : RuntimePlantData
|
||||
{
|
||||
public override void TakeDamage(int amount, Node origin, Utility.DamageTypes damageType = Utility.DamageTypes.PHYSICAL)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void Kill()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
1
scripts/components/plants/LoseZone.cs.uid
Normal file
1
scripts/components/plants/LoseZone.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://c0ov2bq5er0gh
|
||||
|
|
@ -25,7 +25,7 @@ public partial class RuntimePlantData : Node2D, IEntity
|
|||
_hp = _maxHP;
|
||||
}
|
||||
|
||||
public void Heal(int amount, Node origin)
|
||||
public virtual void Heal(int amount, Node origin)
|
||||
{
|
||||
_hp += amount;
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ public partial class RuntimePlantData : Node2D, IEntity
|
|||
}
|
||||
}
|
||||
|
||||
public void TakeDamage(int amount, Node origin, Utility.DamageTypes damageType = Utility.DamageTypes.PHYSICAL)
|
||||
public virtual void TakeDamage(int amount, Node origin, Utility.DamageTypes damageType = Utility.DamageTypes.PHYSICAL)
|
||||
{
|
||||
_hp -= amount;
|
||||
|
||||
|
|
@ -48,18 +48,18 @@ public partial class RuntimePlantData : Node2D, IEntity
|
|||
Kill();
|
||||
}
|
||||
}
|
||||
public void Kill()
|
||||
public virtual void Kill()
|
||||
{
|
||||
PoolContainer.Instance.EntityField[Resource.Layer].Remove(GlobalPosition);
|
||||
QueueFree();
|
||||
}
|
||||
|
||||
public void DisableBrain()
|
||||
public virtual void DisableBrain()
|
||||
{
|
||||
GetNode<Node>("Behaviour").ProcessMode = ProcessModeEnum.Disabled;
|
||||
}
|
||||
|
||||
public void EnableBrain()
|
||||
public virtual void EnableBrain()
|
||||
{
|
||||
GetNode<Node>("Behaviour").ProcessMode = ProcessModeEnum.Inherit;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue