Zombie tie
This commit is contained in:
parent
67a714b4c2
commit
32f1538b0d
6 changed files with 105 additions and 66 deletions
|
|
@ -13,6 +13,14 @@ public partial class RuntimeZombieData : Entity
|
|||
[Signal] public delegate void HasBeenKilledEventHandler(RuntimeZombieData who);
|
||||
public bool AbleToEat = true;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
base._Ready();
|
||||
|
||||
|
||||
LocalTimescale += (float)GD.RandRange(-0.05, 0.05);
|
||||
}
|
||||
|
||||
public override void Heal(float amount, Node origin)
|
||||
{
|
||||
if (_armor != null)
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@ public partial class ZombieMover : Node
|
|||
public override void _Ready()
|
||||
{
|
||||
_zombie = GetParent<Node2D>();
|
||||
_speed = (FloatModifiers)_speed.Duplicate();
|
||||
_speed.ChangePercentage((float)GD.RandRange(-0.05,0.05));
|
||||
}
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue