// Use this for initialization
    void Start()
    {
        playerList = new List <GameObject> ();

        //create instance of the player dictionary, from other scripts
        addplayers = GetComponent <addPlayers>();
        playerDict = new Dictionary <string, GameObject> ();

        //grab players from dicitonary and put name strings into list

        tiles   = GetComponent <organizeGameSpaces>();
        tileSet = new List <GameObject> ();
        tileSet = tiles.spaces;

        currentTurn  = 0;
        currentRound = 0;
    }
Beispiel #2
0
 public void activateSimulation(bool activate)
 {
     playerPanel.SetActive(false);
     Debug.Log(activate);
     if (activate)
     {
         addPlayers addplayers = GetComponent <addPlayers> ();
         for (int i = 0; i < Random.Range(2, 10); i++)
         {
             string name = namegen.GetNextRandomName();
             addplayers.populateList(name);
             Debug.Log("adding player " + name);
         }
         addplayers.createPlayers();
     }
     else
     {
         simulationChoicePanel.SetActive(false);
     }
 }