public void Update() { if (!body.Grounded) { if (airTime > 0) { airTime -= Time.deltaTime; if (!shakeEffect.IsShaking && airTime <= instableTime) { shakeEffect.Shake(shakeStrenght, instableTime, false); } } else { if (shakeEffect.IsShaking) { shakeEffect.Stop(); } body.GravityMultiplier = gravityMultiplier; } } }
public override void StopDrilling(DrillBit db) { base.StopDrilling(db); ShakeFX.Stop(); }