Beispiel #1
0
        public override void Awake()
        {
            base.Awake();

            var t = mDMono.transform;

            NameLabel         = t.GetComponent <UILabel>("Label");
            OpenObj           = t.FindEx("Unlock").gameObject;
            LockObj           = t.FindEx("Lock").gameObject;
            RedPoint          = t.FindEx("RedPoint").gameObject;
            BGSprite          = t.GetComponent <UISprite>("Bg");
            BlitzBtnObj       = t.FindEx("Unlock/BlitzBtn").gameObject;
            EnterBtnObj       = t.FindEx("Unlock/EnterBtn").gameObject;
            C_vigorController = t.GetMonoILRComponent <EnterVigorController>("Unlock/EnterBtn/Sprite");
            B_vigorController = t.GetMonoILRComponent <EnterVigorController>("Unlock/BlitzBtn/Sprite");
            DropItemList      = new List <LTShowItem>();
            var itemListRoot = t.FindEx("ItemList");

            for (var i = 0; i < itemListRoot.childCount; i++)
            {
                DropItemList.Add(itemListRoot.GetChild(i).GetMonoILRComponent <LTShowItem>());
            }

            ticketneedNum  = t.GetComponent <UILabel>("Unlock/EnterBtn/Num");
            ticketneedNum2 = t.GetComponent <UILabel>("Unlock/BlitzBtn/Num (1)");

            t.GetComponent <ConsecutiveClickCoolTrigger>("Unlock/BlitzBtn").clickEvent.Add(new EventDelegate(OnBlitzBtnClick));
            t.GetComponent <UIButton>("Unlock/EnterBtn").onClick.Add(new EventDelegate(OnChallengeBtnClick));

            LTUIUtil.SetText(ticketneedNum, LTAwakeningInstanceConfig.GetCost().ToString());
            LTUIUtil.SetText(ticketneedNum2, LTAwakeningInstanceConfig.GetCost().ToString());
        }
Beispiel #2
0
        public void OnMoreBtnClick()
        {
            int num = 0;

            DataLookupsCache.Instance.SearchIntByID("userAwakenCampaign.ticket", out num);

            int uid = 0;

            DataLookupsCache.Instance.SearchIntByID("userAwakenCampaign.uid", out uid);

            if (num < LTAwakeningInstanceConfig.GetCost())
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_PARTNER_AWAKEN_TIP_6"));
                return;
            }

            if (LTAwakeningInstanceConfig.AwakeningIsLock(m_AwakenDungeonTemplate.Type))
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_PARTNER_AWAKEN_TIP_7"));
                return;
            }

            num = num >= 10 * LTAwakeningInstanceConfig.GetCost() ? 10 * LTAwakeningInstanceConfig.GetCost() : num / LTAwakeningInstanceConfig.GetCost();
            LTAwakeningInstanceManager.Instance.Blitz(uid, m_AwakenDungeonTemplate.ID, num, () =>
            {
                StartCoroutine(ResetScroll());
                Hotfix_LT.Messenger.Raise(Hotfix_LT.EventName.OnPartnerEquipChange);//装备数量发生变化需要通知发送下
            });
        }