50% rule
This commit is contained in:
parent
f2e4768b7e
commit
f0be16c9f2
11 changed files with 214 additions and 142 deletions
|
|
@ -7,13 +7,14 @@ public partial class RuntimeZombieData : Entity
|
|||
[Export]
|
||||
private Armor _armor;
|
||||
[Signal] public delegate void HasBeenKilledEventHandler(RuntimeZombieData who);
|
||||
[Signal] public delegate void HPChangedMixedEventHandler(float delta);
|
||||
public bool AbleToEat = true;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
base._Ready();
|
||||
|
||||
|
||||
OnHPChanged += HPChangedMixedInvokerSource;
|
||||
LocalTimescale += (float)GD.RandRange(-0.05, 0.05);
|
||||
}
|
||||
|
||||
|
|
@ -48,6 +49,14 @@ public partial class RuntimeZombieData : Entity
|
|||
KillByDamage();
|
||||
}
|
||||
}
|
||||
public void HPChangedMixedInvokerSource(float delta, Node source)
|
||||
{
|
||||
EmitSignal(SignalName.HPChangedMixed, delta);
|
||||
}
|
||||
public void HPChangedMixedInvoker(float delta)
|
||||
{
|
||||
EmitSignal(SignalName.HPChangedMixed, delta);
|
||||
}
|
||||
#region Death sequence
|
||||
private bool _killed = false;
|
||||
public override void KillByDamage()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue