public static void Shake(float duration, float power) { stop = false; if (percentComplete == 1) { originalPos = tr.localPosition; } i_Mode = ThisShakeMode.XYZ; elapsed = 0; i_Duration = duration; i_Power = power; }
public static void Shake(float duration, float power, ThisShakeMode mode) { stop = false; PlayerController.Instance.isProtected = true; if (percentComplete == 1) { originalPos = tr.localPosition; } i_Mode = mode; elapsed = 0; i_Duration = duration; i_Power = power; }