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); }
private void GearDown() { _player.ShiftDown(); }