示例#1
0
 public void Show_PopDoublePanel_Reward(MG_PopDoublePanel_RewardType rewardType, int rewardNum)
 {
     MG_PopDoublePanel_Type = rewardType;
     MG_PopDoublePanel_Num  = rewardNum;
     MG_UIManager.Instance.ShowPopPanelAsync(MG_PopPanelType.DoublePanel);
 }
示例#2
0
        public override IEnumerator OnEnter()
        {
            clickTime             = 0;
            rewardNum             = MG_Manager.Instance.MG_PopDoublePanel_Num;
            rewardType            = MG_Manager.Instance.MG_PopDoublePanel_Type;
            img_RewardIcon.sprite = dic_type_sp[(int)rewardType];

            switch (rewardType)
            {
            case MG_PopDoublePanel_RewardType.SSS:
                SetSpecialShowTextButton(MG_SaveManager.Get777Times);
                if (!MG_SaveManager.GuidScratch)
                {
                    MG_Manager.Instance.next_GuidType = MG_Guid_Type.ScratchGuid;
                }
                break;

            case MG_PopDoublePanel_RewardType.Amazon:
                SetSpecialShowTextButton(MG_SaveManager.GetAmazonTimes);
                break;

            case MG_PopDoublePanel_RewardType.Cherry:
            case MG_PopDoublePanel_RewardType.Orange:
            case MG_PopDoublePanel_RewardType.Watermalen:
                SetSpecialShowTextButton(MG_SaveManager.GetFruitsTimes);
                break;

            case MG_PopDoublePanel_RewardType.Diamond:
                if (!MG_SaveManager.GuidSlots)
                {
                    MG_Manager.Instance.next_GuidType = MG_Guid_Type.SlotsGuid;
                }

                go_AdIcon.SetActive(true);
                needAd     = true;
                needDouble = true;
                trans_AdDes.localPosition = new Vector2(31.512f, 6.1525f);
                text_AdDes.text           = "GET  x2";
                break;

            case MG_PopDoublePanel_RewardType.Gold:
            case MG_PopDoublePanel_RewardType.Scratch:
            case MG_PopDoublePanel_RewardType.WheelTicket:
                go_AdIcon.SetActive(true);
                needAd     = true;
                needDouble = true;
                trans_AdDes.localPosition = new Vector2(31.512f, 6.1525f);
                text_AdDes.text           = "GET  x2";
                break;

            case MG_PopDoublePanel_RewardType.SignScratchTicket:
                go_AdIcon.SetActive(false);
                needAd     = false;
                needDouble = false;
                trans_AdDes.localPosition = new Vector2(0, 6.1525f);
                text_AdDes.text           = "GET";
                break;

            default:
                go_AdIcon.SetActive(true);
                needAd     = true;
                needDouble = false;
                trans_AdDes.localPosition = new Vector2(31.512f, 6.1525f);
                text_AdDes.text           = "GET";
                break;
            }

            text_ReawrdNum.text = rewardNum.ToString();
            StartCoroutine("AutoRotateLight");

            Transform transAll = transform.GetChild(1);

            transAll.localScale        = new Vector3(0.8f, 0.8f, 1);
            canvasGroup.alpha          = 0.8f;
            canvasGroup.blocksRaycasts = true;
            while (transAll.localScale.x < 1)
            {
                yield return(null);

                float addValue = Time.unscaledDeltaTime * 2;
                transAll.localScale += new Vector3(addValue, addValue);
                canvasGroup.alpha   += addValue;
            }
            transAll.localScale      = Vector3.one;
            canvasGroup.alpha        = 1;
            canvasGroup.interactable = true;
        }