コード例 #1
0
    private void PlayerDataUpdatedHandler(string reason, PlayerDataUpdatedData updatedData)
    {
        if (reason.Equals(PlayerDataUpdateReasons.ItemBought))
        {
            txtErrorMessage.text = "Transaction successfull";
            pnlErrorMessage.SetActive(true);
        }

        updateUI();
    }
コード例 #2
0
 private void PlayerDataUpdatedHandler(string reason, PlayerDataUpdatedData updatedData)
 {
     // Check reason and inform the player for instance if a purchase was successfull
     // The reason that is returned is the same as the reason that was passed as a parameter
     // for the method that initiated the PlayerData update. So for instance:
     // Spil.PlayerData.Inventory.Add(Spil.GameData.Items[0].Id, 1, PlayerDataUpdateReasons.ItemBought);
     // Will return the string PlayerDataUpdateReasons.ItemBought. See the PlayerDataUpdateReasons class in PlayerDataHelper.cs
     // for standard reasons.
 }