temporary files rename
This commit is contained in:
parent
8e077e523c
commit
a87f0ed109
823 changed files with 20 additions and 5 deletions
|
@ -0,0 +1,22 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class ZombieSpeedBoost : BaseCapacity
|
||||
{
|
||||
[SerializeField] float timeToBoost;
|
||||
[SerializeField] float boost;
|
||||
protected override bool CapacityCall()
|
||||
{
|
||||
MinecraftUnit minecraftUnit = _unit as MinecraftUnit;
|
||||
StartCoroutine(AddThenRemoveSpeed(minecraftUnit));
|
||||
return true;
|
||||
}
|
||||
|
||||
private IEnumerator AddThenRemoveSpeed(MinecraftUnit minecraftUnit)
|
||||
{
|
||||
// Possibility float imprecision issues
|
||||
minecraftUnit.MovementHandler.speed *= boost;
|
||||
yield return new WaitForSeconds(timeToBoost);
|
||||
minecraftUnit.MovementHandler.speed /= boost;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue