void CommandSelection() { if (Input.GetMouseButtonDown(1)) { if (selectedUnit != null) { GameManager.instance.audioSource.PlayOneShot(GameManager.instance.selection); selectedUnit.tryToBoard = false; selectedUnit.buildingToTryToEnter = null; if (commandIndicator.mode == CommandType.BOARD) { commandPosition = DockZone.zoneForLocation[Island.AtPoint(selectedUnit.transform.position).location].GetRandomPoint(); selectedUnit.tryToBoard = true; } else if (commandIndicator.mode == CommandType.ENTER) { selectedUnit.buildingToTryToEnter = buildingUnderCursor; } selectedUnit.MoveTo(commandPosition); IntroManager.instance.OnMoveCommandSent(); } } }