Method ChangeGear
ChangeGear(int)
Shifts the gear box to the desired gear. -1 and 0 are reserved for reverse and neutral respectively.
Declaration
public IEnumerator ChangeGear(int nextGear)
Parameters
| Type | Name | Description |
|---|---|---|
| int | nextGear | The chosen next gear, int value between -1 and the maximum gear |
Returns
| Type | Description |
|---|---|
| IEnumerator | Returns an yield to be used in conjunction StartCoroutine from a MonoBehaviour script. |