private bool onMyRewardAssetsReceived(RewardServiceEvents.MyAssetsReceived evt) { if (evt.Assets.mascotXP != null) { foreach (KeyValuePair <string, long> item in evt.Assets.mascotXP) { myMascotXP[item.Key] = item.Value; } } addRewardItems(evt.Assets); return(false); }
private bool onMyRewardAssetsReceived(RewardServiceEvents.MyAssetsReceived evt) { if (isFirstCoinsReceived) { Dictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary.Add("monetization.coins_balance", evt.Assets.coins.ToString()); Service.Get <ICPSwrveService>().UserUpdate(dictionary); dataEntityCollection.GetComponent <CoinsData>(dataEntityCollection.LocalPlayerHandle).SetInitialCoins(evt.Assets.coins); } else { dataEntityCollection.GetComponent <CoinsData>(dataEntityCollection.LocalPlayerHandle).Coins = evt.Assets.coins; } dataEntityCollection.GetComponent <CollectiblesData>(dataEntityCollection.LocalPlayerHandle).CollectibleTotals = evt.Assets.collectibleCurrencies; isFirstCoinsReceived = false; return(false); }