static bool phaseEqualsTweenTime(UnityPhase phase, TweenTime time) { switch (time) { case TweenTime.OnUpdate: case TweenTime.OnUpdateUnscaled: if (phase == UnityPhase.Update) { return(true); } break; case TweenTime.OnLateUpdate: case TweenTime.OnLateUpdateUnscaled: if (phase == UnityPhase.LateUpdate) { return(true); } break; case TweenTime.OnFixedUpdate: if (phase == UnityPhase.FixedUpdate) { return(true); } break; default: throw new ArgumentOutOfRangeException(); } return(false); }
public void FixedUpdate() { phase = UnityPhase.FixedUpdate; onFixedUpdate.runOn(Time.fixedDeltaTime); }
public void LateUpdate() { phase = UnityPhase.LateUpdate; onLateUpdate.runOn(Time.deltaTime); onLateUpdateUnscaled.runOn(Time.unscaledDeltaTime); }