int getActualVertex() { int playerIndex = getActualTurn(); GameObject player = InformationTransfer.getPlayer(playerIndex); SelectVertex script = player.GetComponent <SelectVertex>(); return(script.getActualVertex()); }
void updatePlayer() { PlayerController controllerScript = gameObject.GetComponent <PlayerController>(); int turn = controllerScript.getTurn(); GameObject player = InformationTransfer.getPlayer(turn); playerScript = player.GetComponent <SelectVertex>(); }
void quitVisited() { int playerIndex = getActualTurn(); GameObject player = InformationTransfer.getPlayer(playerIndex); SelectVertex script = player.GetComponent <SelectVertex>(); for (int i = 0; i < 26; i++) { if (script.isVisited(i)) { distance[i] = -1; } } }
void Start() { for (int i = 0; i < InformationTransfer.amountOfPlayers; i++) { GameObject player = InformationTransfer.getPlayer(i); player.AddComponent <SelectVertex>(); SelectVertex vertex = (SelectVertex)player.GetComponent(typeof(SelectVertex)); vertex.id = i; Destroy(player.GetComponent("Interaction")); InformationTransfer.overwritePlayer(player, i); canContinue[i] = true; } label.text = "Jugador: " + (InformationTransfer.turnOrder[0] + 1); InformationTransfer.quitUnusedPlayer(); InformationTransfer.playerController = gameObject; script = (DicesController)diceController.GetComponent(typeof(DicesController)); }