Aloe
This commit is contained in:
parent
22f5f7a02a
commit
850d7629e5
5 changed files with 23 additions and 47 deletions
|
|
@ -28,6 +28,7 @@ public partial class Entity : Node2D
|
|||
{
|
||||
EmitSignal(SignalName.OnHPChanged, amount, origin);
|
||||
HP += amount;
|
||||
if (HP > MaxHP) HP = MaxHP;
|
||||
}
|
||||
|
||||
public virtual void KillByDamage()
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public partial class AloeBehaviour : BaseBehaviour
|
|||
var checkPos = GetParent<Node2D>().GlobalPosition + Vector2.Right * Utility.TileWidth;
|
||||
if (PoolContainer.Instance.TryGetEntity(checkPos, out RuntimePlantData plantData))
|
||||
{
|
||||
plantData.Heal(3000 + 25 * plantData.MaxHP, GetParent());
|
||||
plantData.Heal(1200 + 0.5f * plantData.MaxHP, GetParent());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue