private IEnumerator GhostRacerAction(int action, float time) { yield return(new WaitForSeconds(time)); if (ghostRacer == null) { yield return(null); } switch (action) { case GhostDataBundle.EventType.ThrottlePress: ghostRacer.StepOnGas(); break; case GhostDataBundle.EventType.ThrottleRelease: ghostRacer.ReleaseGas(); break; case GhostDataBundle.EventType.GearUp: ghostRacer.ShiftUp(); break; case GhostDataBundle.EventType.GearDown: ghostRacer.ShiftDown(); break; default: break; } yield return(null); }
void FixedUpdate() { if (_Car.IsLaunched) { if (_Car.CurrnetRPM >= _Car.MaxRPM - 10) { _Car.ShiftUp(); } } else { _Car.StepOnGas(); } }
private void GearUp() { _player.ShiftUp(); }