Exemple #1
0
    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();
    }
Exemple #2
0
    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();
    }
Exemple #3
0
    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();
    }
Exemple #4
0
    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();
        }
    }