public void GetLifes() { RewardIcon reward = MenuManager.Instance.RewardPopup.GetComponent <RewardIcon>(); reward.SetIconSprite(1); reward.gameObject.SetActive(true); InitScript.Instance.RestoreLifes(); MenuManager.Instance.MenuLifeShop.GetComponent <AnimationManager>().CloseMenu(); }
public void GetCoins(int addCoins) { RewardIcon reward = MenuManager.Instance.RewardPopup.GetComponent <RewardIcon>(); reward.SetIconSprite(0); reward.gameObject.SetActive(true); InitScript.Instance.AddGems(addCoins); MenuManager.Instance.MenuCurrencyShop.GetComponent <AnimationManager>().CloseMenu(); }
public void getReward() { RewardIcon reward = MenuManager.Instance.RewardPopup.GetComponent <RewardIcon> (); reward.SetIconSprite(0); reward.gameObject.SetActive(true); InitScriptName.InitScript.Instance.AddGems(mission.getGift()[0].amount); mission.rewarded = true; setUI(); }
void CheckRewardedAds() { RewardIcon reward = GameObject.Find("CanvasGlobal").transform.Find("Reward").GetComponent <RewardIcon> (); if (currentReward == RewardedAdsType.GetGems) { reward.SetIconSprite(0); reward.gameObject.SetActive(true); AddGems(rewardedGems); GameObject.Find("CanvasGlobal").transform.Find("GemsShop").GetComponent <AnimationManager> ().CloseMenu(); } else if (currentReward == RewardedAdsType.GetLifes) { reward.SetIconSprite(1); reward.gameObject.SetActive(true); RestoreLifes(); GameObject.Find("CanvasGlobal").transform.Find("LiveShop").GetComponent <AnimationManager> ().CloseMenu(); } else if (currentReward == RewardedAdsType.GetGoOn) { GameObject.Find("CanvasGlobal").transform.Find("PreFailed").GetComponent <AnimationManager> ().GoOnFailed(); } }