Exemple #1
0
 public void startGame()
 {
     if (readyPlayers == GameInfo.playersNo)
     {
         JobPanel.JobInformation[] playersJobs;
         playersJobs = new JobPanel.JobInformation[GameInfo.playersNo];
         // set the business struct to each player
         for (int i = 0; i < GameInfo.playersNo; i++)
         {
             playersJobs[i] = panelsDict[jobSelectionsInternal[i]].getJobInformation();
         }
         generalManager.setPlayersJobs(playersJobs);
         generalManager.enableInitialGUIandStart();
         this.gameObject.SetActive(false);
         // proceed to game
     }
     else
     {
         // not all players selected a business
         // StartCoroutine(EnableObjectForSeconds(notReadyText, 3));
     }
 }
Exemple #2
0
 /*
  * This function receives the initial job struct formed after the player
  * selected their initial business, and sets it too the current player.
  * it should be then updates as the game progresses.
  */
 public void setJobInfoSruct(JobPanel.JobInformation jobInfo)
 {
     jobInformationStruct = jobInfo;
     this.initialJob      = jobInfo.jobTypeEnum;
 }