示例#1
0
    int getActualVertex()
    {
        int          playerIndex = getActualTurn();
        GameObject   player      = InformationTransfer.getPlayer(playerIndex);
        SelectVertex script      = player.GetComponent <SelectVertex>();

        return(script.getActualVertex());
    }
示例#2
0
    void updatePlayer()
    {
        PlayerController controllerScript = gameObject.GetComponent <PlayerController>();
        int        turn   = controllerScript.getTurn();
        GameObject player = InformationTransfer.getPlayer(turn);

        playerScript = player.GetComponent <SelectVertex>();
    }
示例#3
0
    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;
            }
        }
    }
示例#4
0
 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));
 }