Atrocities
This commit is contained in:
parent
8e0f90ae3d
commit
9680b21792
90 changed files with 324 additions and 69 deletions
1
scripts/components/zombies/AudioDamage.cs.uid
Normal file
1
scripts/components/zombies/AudioDamage.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bsg4utgc0u0vo
|
||||
1
scripts/components/zombies/EatBox.cs.uid
Normal file
1
scripts/components/zombies/EatBox.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dqyony6jxt2p0
|
||||
|
|
@ -16,14 +16,13 @@ public partial class RuntimeZombieData : Node2D, IEntity, ILocalTimescale, IEffe
|
|||
[Export]
|
||||
private int _maxHP;
|
||||
[Export]
|
||||
private int _line;
|
||||
private Armor _armor;
|
||||
|
||||
|
||||
private float _localTimescale = 1.0f;
|
||||
public int Hp => _hp;
|
||||
|
||||
public int MaxHp => _maxHP;
|
||||
|
||||
public int Line => _line;
|
||||
public int MaxHp => _maxHP;
|
||||
|
||||
public bool AbleToEat = true;
|
||||
|
||||
|
|
@ -54,8 +53,14 @@ public partial class RuntimeZombieData : Node2D, IEntity, ILocalTimescale, IEffe
|
|||
|
||||
public void Heal(int amount,Node origin)
|
||||
{
|
||||
_hp += amount;
|
||||
if(_armor != null)
|
||||
{
|
||||
_hp += _armor.Heal(amount);
|
||||
}
|
||||
else
|
||||
_hp += amount;
|
||||
EmitSignal(SignalName.OnHPChanged,amount,origin);
|
||||
|
||||
|
||||
if (MaxHp > 0)
|
||||
{
|
||||
|
|
@ -65,7 +70,12 @@ public partial class RuntimeZombieData : Node2D, IEntity, ILocalTimescale, IEffe
|
|||
|
||||
public void TakeDamage(int amount, Node origin, Utility.DamageTypes damageType = Utility.DamageTypes.PHYSICAL)
|
||||
{
|
||||
_hp -= amount;
|
||||
if(_armor != null)
|
||||
{
|
||||
_hp -= _armor.RecieveDamage(amount);
|
||||
}
|
||||
else
|
||||
_hp -= amount;
|
||||
EmitSignal(SignalName.OnHPChanged,-amount, origin);
|
||||
|
||||
if (_hp <= 0)
|
||||
|
|
|
|||
1
scripts/components/zombies/RuntimeZombieData.cs.uid
Normal file
1
scripts/components/zombies/RuntimeZombieData.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dildme6epx8l4
|
||||
1
scripts/components/zombies/ZombieMover.cs.uid
Normal file
1
scripts/components/zombies/ZombieMover.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://7hdj2k14lfe4
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://cgf61r46dgh4m
|
||||
Loading…
Add table
Add a link
Reference in a new issue