void UpdateSelecting() { if (joystick.GetButtonDown("UISubmit")) { if (selectManager.LockInCharacter(playerIndex, characterIndex)) { state = SelectState.chosen; } } else if (joystick.GetAxis("Move Horizontal") != 0 && inputAvailable) { StartCoroutine("InputRepeatDelay"); float h = joystick.GetAxis("Move Horizontal"); characterIndex = h > 0 ? (characterIndex = ++characterIndex > 3 ? 0 : characterIndex) : (characterIndex = --characterIndex < 0 ? 3 : characterIndex); selectManager.ChangeCharacter(playerIndex, characterIndex); } else if (joystick.GetButtonDown("UICancel")) { selectManager.DeactivatePlayer(playerIndex); state = SelectState.inactive; } }