Esempio n. 1
0
 public void PurchaseSelectedItem()
 {
     //Debug.Log (purchasedItemsData[0]);
     purchasedItemsData.Add(ParseItems(curSelectedItem.englishName, "purchase"));
     displayedItemsData.Remove(ParseItems(curSelectedItem.englishName, "remove"));
     playerDataController.UpdatePlayerCoins(-(int)curSelectedItem.cost);
     EndandSave();
     GetComponent <ShopDisplayController> ().Initialize();
 }
 private void UpdatePlayerData(bool win)
 {
     if (win)
     {
         if (playerData != null)
         {
             playerData.UpdatePlayerCoins(5);
             Debug.Log("Player Data(coins) updated");
         }
     }
 }
    public void WinThisRound()
    {
        playerDataController = GameObject.FindGameObjectWithTag("Persistent")        //Get the PlayerDataController
                               .GetComponent <PlayerDataController>();
        if (playerDataController)
        {
            Debug.Log("playerDataController is found successfully");

            playerDataController.UpdatePlayerCoins(10);
        }
    }