예제 #1
0
 public void ConfirmedBuyTeam()
 {
     Debug.Log("Successfully bought this team");
     // Need to check amount then allow player to buy team
     if (teamDict.ContainsKey(teamNameText.GetParsedText().ToString()))
     {
         userDataController.userData.baskyCoins -= teamDict[teamNameText.GetParsedText()].TeamCost;
         userDataController.SaveGameData();
         baskyCoins.SetText(userDataController.userData.baskyCoins.ToString());
         teamDict[teamNameText.GetParsedText()].LockedStatus = false;
         teamDataController.EditTeamData(teamDict[teamNameText.GetParsedText().ToString()]);
         LoadBuyTeamData();
         if (teamDict == null || teamDict.Count == 0)
         {
             noTeamToBuyPopup.SetActive(true);
         }
         else
         {
             noTeamToBuyPopup.SetActive(false);
         }
     }
     else
     {
         Debug.Log("Team does not exist in dictionary");
     }
 }