コード例 #1
0
    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);
    }
コード例 #2
0
 private void GearDown()
 {
     _player.ShiftDown();
 }