Beispiel #1
0
 private void UpdateShowItems(int necessaryCount, UIGrid gridParent)
 {
     if (m_ShowItems.Count > necessaryCount)
     {
         for (int i = 0; i < necessaryCount; i++)
         {
             m_ShowItems[i].mDMono.transform.gameObject.SetActive(true);
         }
         for (int i = necessaryCount; i < m_ShowItems.Count; i++)
         {
             m_ShowItems[i].mDMono.transform.gameObject.SetActive(false);
         }
     }
     else
     {
         for (int i = 0; i < m_ShowItems.Count; i++)
         {
             m_ShowItems[i].mDMono.transform.gameObject.SetActive(true);
         }
         if (necessaryCount > m_ShowItems.Count)
         {
             int begin = m_ShowItems.Count;
             for (int i = begin; i < necessaryCount; i++)
             {
                 GameObject itemObject = Object.Instantiate(m_GiftItemPrefab, gridParent.transform);
                 gridParent.AddChild(itemObject.transform);
                 itemObject.transform.localScale = Vector3.one;
                 LTShowItem showItem = itemObject.GetMonoILRComponent <LTShowItem>();
                 m_ShowItems.Add(showItem);
                 itemObject.SetActive(true);
             }
         }
     }
 }
Beispiel #2
0
        public override void Awake()
        {
            base.Awake();
            CheckMouseClick = false;

            var t = controller.transform;

            ShowItem                   = t.GetMonoILRComponent <LTShowItem>("Content/LTShowItem");
            TypeLabel                  = t.GetComponent <UILabel>("Content/LTShowItem/TypeBg/Label");
            QualitySprite              = t.GetComponent <UISprite>("Content/LTShowItem/Quality");
            TypeSprite                 = t.GetComponent <UISprite>("Content/LTShowItem/TypeBg/Sprite");
            DescTextLabel              = t.GetComponent <UILabel>("Content/DescLabel");
            Bg                         = t.GetComponent <BoxCollider>("Content/BG");
            FullBg                     = t.FindEx("Content/FullBG").gameObject;
            CommonSkillBreakSprite     = t.GetComponent <DynamicUISprite>("Content/Grid/CommonSkill/SkillItem/Icon");
            CommonSkillBreakNameLabel  = t.GetComponent <UILabel>("Content/Grid/CommonSkill/NameLabel");
            PassiveSkillBreakSprite    = t.GetComponent <DynamicUISprite>("Content/Grid/PassiveSkill/SkillItem/Icon");
            PassiveSkillBreakNameLabel = t.GetComponent <UILabel>("Content/Grid/PassiveSkill/NameLabel");
            ActiveSkillBreakSprite     = t.GetComponent <DynamicUISprite>("Content/Grid/ActiveSkill/SkillItem/Icon");
            ActiveSkillBreakNameLabel  = t.GetComponent <UILabel>("Content/Grid/ActiveSkill/NameLabel");

            t.GetComponent <UIButton>("Content/Grid/CommonSkill/SkillItem").onClick.Add(new EventDelegate(OnCommonSkillItemClick));
            t.GetComponent <UIButton>("Content/Grid/ActiveSkill/SkillItem").onClick.Add(new EventDelegate(OnActiveSkillClick));
            t.GetComponent <UIButton>("Content/Grid/PassiveSkill/SkillItem").onClick.Add(new EventDelegate(OnPassiveSkillClick));
        }
Beispiel #3
0
        public override void Awake()
        {
            var t = mDMono.transform;

            showItem     = t.GetMonoILRComponent <LTShowItem>("LTShowItem");
            clickTrigger = t.GetComponent <ConsecutiveClickCoolTrigger>("ToGetButton");
        }
Beispiel #4
0
        private void OnInitReward(List <LTShowItemData> dataList)
        {
            for (int i = 0; i < RewardItemList.Count; i++)
            {
                RewardItemList[i].mDMono.gameObject.CustomSetActive(false);
            }

            if (dataList == null)
            {
                return;
            }

            for (int i = 0; i < dataList.Count; i++)
            {
                if (i < RewardItemList.Count)
                {
                    RewardItemList[i].LTItemData = dataList[i];
                    RewardItemList[i].mDMono.gameObject.CustomSetActive(true);
                }
                else
                {
                    LTShowItem temp = GameObject.Instantiate(ItemPrefab.mDMono, ItemRoot.transform).transform.GetMonoILRComponent <LTShowItem>();
                    temp.LTItemData = dataList[i];
                    temp.mDMono.gameObject.CustomSetActive(true);
                    RewardItemList.Add(temp);
                }
            }
            ItemRoot.Reposition();
        }
Beispiel #5
0
        public override void Awake()
        {
            base.Awake();

            var t = mDMono.transform;

            Container = t.FindEx("Container").gameObject;

            DynamicScroll = t.GetMonoILRComponent <LTChallengeInstanceBagScroll>("Container/BottomRight/Right/Scroll/PlaceHolder/Grid");
            DynamicScroll.SetOnBtnClickAction(OnSkillScrollItemClick);
            FirstBagCell   = DynamicScroll.mDMono.transform.GetMonoILRComponent <LTChallengeInstanceBagCell>("Row/Item");
            ScrollTipsGO   = t.GetComponent <TweenScale>("Container/SkillTips");
            SkillTipsItem  = t.GetMonoILRComponent <LTShowItem>("Container/SkillTips/TweenHUD/UpGroup/LTShowItem");
            SkillNameLabel = t.GetComponent <UILabel>("Container/SkillTips/TweenHUD/UpGroup/Label");
            CostMagicLabel = t.GetComponent <UILabel>("Container/SkillTips/TweenHUD/UpGroup/Magic/Label");
            DescLabel      = t.GetComponent <UILabel>("Container/SkillTips/TweenHUD/Desc");

            t.GetComponent <UIButton>("Container/BottomRight/Bg/Top/RuleBtn").onClick.Add(new EventDelegate(OnRuleBtnClick));
            t.GetComponent <UIButton>("Container/BottomRight/Bg/Top/CancelBtn").onClick.Add(new EventDelegate(OnClose));
            t.GetComponent <UIButton>("Container/SkillTips/TweenHUD/UseBtn").onClick.Add(new EventDelegate(OnUseSkillBtnClick));

            GameObject go  = t.FindEx("Container/BottomRight/Right/Scroll/PlaceHolder/Grid/Row/Item").gameObject;
            GameObject go1 = t.FindEx("Container/BottomRight/Right/Scroll/PlaceHolder/Grid/Row/Item (1)").gameObject;
            GameObject go2 = t.FindEx("Container/BottomRight/Right/Scroll/PlaceHolder/Grid/Row/Item (2)").gameObject;
            GameObject go3 = t.FindEx("Container/BottomRight/Right/Scroll/PlaceHolder/Grid/Row/Item (3)").gameObject;

            t.GetComponent <UIEventTrigger>("Container/Background").onClick.Add(new EventDelegate(OnClose));
        }
Beispiel #6
0
        public override void Awake()
        {
            base.Awake();

            var t = controller.transform;

            controller.backButton = t.GetComponent <UIButton>("Bg_Sprites/BG/Top/CloseBtn");

            SourceItem      = t.GetMonoILRComponent <LTShowItem>("Content/Item/SourceIcon");
            DesItem         = t.GetMonoILRComponent <LTShowItem>("Content/Item/DesIcon");
            SourceItemLabel = t.GetComponent <UILabel>("Content/Item/SourceIcon/Num");
            DesItemLabel    = t.GetComponent <UILabel>("Content/Item/DesIcon/Num");
            TransNumLabel   = t.GetComponent <UILabel>("Content/Use/Adjust/UseNum");
            TipLabel        = t.GetComponent <UILabel>("Content/Item/Label");
            PlusBtn         = t.GetComponent <UISprite>("Content/Use/Adjust/Add");
            SubBtn          = t.GetComponent <UISprite>("Content/Use/Adjust/Reduce");
            UseButton       = t.GetComponent <UISprite>("Content/Use/OkUse");
            MaxButton       = t.GetComponent <UISprite>("Content/Use/Adjust/Max");

            t.GetComponent <UIButton>("Content/Use/Adjust/Max").onClick.Add(new EventDelegate(OnMaxBtnClick));
            t.GetComponent <UIButton>("Content/Use/OkUse").onClick.Add(new EventDelegate(OnTransBtnClick));

            t.GetComponent <ContinuePressTrigger>("Content/Use/Adjust/Reduce").m_CallBackPress.Add(new EventDelegate(OnSubBtnClick));
            t.GetComponent <ContinuePressTrigger>("Content/Use/Adjust/Add").m_CallBackPress.Add(new EventDelegate(OnPlusBtnClick));
        }
Beispiel #7
0
        public override void Awake()
        {
            base.Awake();

            var t = controller.transform;

            CombatCountdownTimeLabel = t.GetComponent <UILabel>("Content/LTPopFrame/CombatTime/Countdown/TimeLabel");
            CombatOpenTimeLabel      = t.GetComponent <UILabel>("Content/LTPopFrame/CombatTime/OpenStartTime/TimeLabel");
            RedPoint = t.FindEx("Content/LTPopFrame/Goto/RedPoint").gameObject;
            controller.backButton = t.GetComponent <UIButton>("UIFrameBG/TopLeftAnchor/CancelBtn");

            CombatRewardShowItems    = new LTShowItem[3];
            CombatRewardShowItems[0] = t.GetMonoILRComponent <LTShowItem>("Content/LTPopFrame/Reward/RewardGrid/LTShowItem");
            CombatRewardShowItems[0] = t.GetMonoILRComponent <LTShowItem>("Content/LTPopFrame/Reward/RewardGrid/LTShowItem (1)");
            CombatRewardShowItems[0] = t.GetMonoILRComponent <LTShowItem>("Content/LTPopFrame/Reward/RewardGrid/LTShowItem (2)");

            OccupancyEntrys = new NationOccupancyEntry[3];
            OccupancyEntrys[0].natinName    = "persian";
            OccupancyEntrys[0].percentLabel = t.GetComponent <UILabel>("Content/LTPopFrame/Occupancy/Grid/Item/ProgressBar/Label");
            OccupancyEntrys[0].progressBar  = t.GetComponent <UIProgressBar>("Content/LTPopFrame/Occupancy/Grid/Item/ProgressBar");

            OccupancyEntrys[1].natinName    = "roman";
            OccupancyEntrys[1].percentLabel = t.GetComponent <UILabel>("Content/LTPopFrame/Occupancy/Grid/Item (1)/ProgressBar/Label");
            OccupancyEntrys[1].progressBar  = t.GetComponent <UIProgressBar>("Content/LTPopFrame/Occupancy/Grid/Item (1)/ProgressBar");

            OccupancyEntrys[2].natinName    = "egypt";
            OccupancyEntrys[2].percentLabel = t.GetComponent <UILabel>("Content/LTPopFrame/Occupancy/Grid/Item (2)/ProgressBar/Label");
            OccupancyEntrys[2].progressBar  = t.GetComponent <UIProgressBar>("Content/LTPopFrame/Occupancy/Grid/Item (2)/ProgressBar");

            t.GetComponent <UIButton>("Content/LTPopFrame/RuleBtn").onClick.Add(new EventDelegate(OnRuleBtnClick));
            t.GetComponent <UIButton>("Content/LTPopFrame/Goto").onClick.Add(new EventDelegate(OnGotoCombatClick));
        }
Beispiel #8
0
 public override void Awake()
 {
     base.Awake();
     BuyLimit     = mDMono.transform.Find("NavButton/BuyLimit").GetComponent <UILabel>();
     GiftGrid     = mDMono.transform.Find("GiftGrid").GetComponent <UIGrid>();
     ItemTemplate = mDMono.transform.Find("GiftGrid/0").GetMonoILRComponent <LTShowItem>();
     ItemTemplate.mDMono.gameObject.CustomSetActive(false);
 }
Beispiel #9
0
        public override void Awake()
        {
            base.Awake();

            Transform t = mDMono.transform;

            m_Item    = t.GetMonoILRComponent <LTShowItem>("Temp/GeneralItem");
            m_NewItem = t.GetMonoILRComponent <NewDrawCardItem>("Temp/HeroItem");
        }
Beispiel #10
0
        public override void Awake()
        {
            base.Awake();
            Transform t = mDMono.transform;

            CountLabel   = t.GetComponent <UILabel>("Num");
            GiftGrid     = mDMono.transform.Find("GiftGrid").GetComponent <UIGrid>();
            ItemTemplate = mDMono.transform.Find("GiftGrid/0").GetMonoILRComponent <LTShowItem>();
            ItemTemplate.mDMono.gameObject.CustomSetActive(false);
        }
Beispiel #11
0
        public override void Awake()
        {
            base.Awake();
            Transform t = mDMono.GetComponent <Transform>();

            taskdes        = t.GetComponent <UILabel>("DesLabel");
            taskdesShadow  = t.GetComponent <UILabel>("DesLabel/Label(Clone)");
            rewardItem     = t.GetMonoILRComponent <LTShowItem>("GiftGrid/LTShowItem");
            Itemdatalookup = t.GetDataLookupILRComponent <InviteTaskDataLookUp>();
        }
Beispiel #12
0
 public override void Awake()
 {
     base.Awake();
     desc           = mDMono.transform.Find("ScrollView/Placeholder/TextContainer/DESC").GetComponent <UILabel>();
     Event_Time     = mDMono.transform.Find("ScrollView/Placeholder/TextContainer/EventTime").GetComponent <UILabel>();
     RewardTemplate = mDMono.transform.Find("ScrollView/Placeholder/Grid/Item").gameObject;
     ItemGrid       = mDMono.transform.Find("ScrollView/Placeholder/Grid").GetComponent <UIGrid>();
     ItemTemplate   = mDMono.transform.Find("ScrollView/Placeholder/Grid/Item/GiftGrid/ShowItem").GetMonoILRComponent <LTShowItem>();
     RewardTemplate.CustomSetActive(false);
     ItemTemplate.mDMono.gameObject.CustomSetActive(false);
 }
Beispiel #13
0
        public override void Awake()
        {
            var t = mDMono.transform;

            lTShowItem = t.GetMonoILRComponent <LTShowItem>("Item");
            addvigor   = t.GetComponent <UILabel>("StateShow/Label");
            useitemBtn = t.GetComponent <ConsecutiveClickCoolTrigger>("StateShow/ToGetButton");
            useitemBtn.clickEvent.Add(new EventDelegate(OnUseRecoverItem));
            showdata = new LTShowItemData("vigor", 1, LTShowItemType.TYPE_RES);
            mask     = t.FindEx("StateShow/Mask").gameObject;
        }
Beispiel #14
0
 /// <summary>
 /// 初始化UIShowItem
 /// </summary>
 private void InitShowItem()
 {
     if (ShowItemList == null)
     {
         ShowItemList = new List <LTShowItem>();
         for (int i = 0; i < Grid.transform.childCount; i++)
         {
             LTShowItem tempItem = Grid.transform.GetChild(i).GetMonoILRComponent <LTShowItem>();
             ShowItemList.Add(tempItem);
         }
     }
 }
Beispiel #15
0
        public LTSpeedSnatchAwardItem(Transform itemRoot)
        {
            this.itemRoot = itemRoot;

            spt001   = itemRoot.Find("ShowAttribute/AttributeIcon1").GetComponent <UISprite>();
            spt002   = itemRoot.Find("ShowAttribute/AttributeIcon2").GetComponent <UISprite>();
            spt003   = itemRoot.Find("ShowAttribute/AttributeIcon3").GetComponent <UISprite>();
            showItem = itemRoot.Find("LTShowItem").GetMonoILRComponent <LTShowItem>();

            otherTipsLabel = itemRoot.Find("OtherTipsLabel").GetComponent <UILabel>();
            showAttrTrans  = itemRoot.Find("ShowAttribute");
        }
Beispiel #16
0
        private LTShowItem GetShowItem()
        {
            LTShowItem showItem = m_AllReward.Find(p => !p.mDMono.gameObject.activeSelf);

            if (showItem == null)
            {
                showItem = GameUtils.InstantiateEx(TemplateItem.mDMono, ItemGrid.transform).transform.GetMonoILRComponent <LTShowItem>();
                m_AllReward.Add(showItem);
            }
            showItem.mDMono.gameObject.SetActive(true);
            return(showItem);
        }
Beispiel #17
0
        public override void Awake()
        {
            base.Awake();

            var t = mDMono.transform;

            Item = t.GetMonoILRComponent <LTShowItem>("LTShowItem");
            Btn  = t.GetComponent <ConsecutiveClickCoolTrigger>("ReceiveBtn");
            Btn.clickEvent.Add(new EventDelegate(OnReceiveBtnClick));
            DayLabel      = t.GetComponent <UILabel>("DayLabel");
            hasReceiveObj = t.FindEx("SelectUI").gameObject;
            FxObj         = t.FindEx("FXObj").gameObject;
        }
Beispiel #18
0
 /// <summary>
 /// 设置奖励
 /// </summary>
 /// <param name="rewards">奖励列表</param>
 private void SetReward(List <LTShowItemData> rewards)
 {
     for (int i = 0; i < m_AllReward.Count; i++)
     {
         m_AllReward[i].mDMono.gameObject.SetActive(false);
     }
     //
     for (int i = 0; i < rewards.Count; i++)
     {
         LTShowItem si = GetShowItem();
         si.LTItemData = new LTShowItemData(rewards[i].id, rewards[i].count, rewards[i].type, true);
     }
     ItemGrid.Reposition();
 }
Beispiel #19
0
        public override void Awake()
        {
            base.Awake();

            Transform t = mDMono.transform;

            _labActivityPrice = t.GetComponent <UILabel>("Btn_Buy/Lab_Price");
            _labOriginalPrice = t.GetComponent <UILabel>("Price/Lab_Price");
            _uiShowItem       = t.GetMonoILRComponent <LTShowItem>("LTShowItem");
            _btnBuy           = t.GetComponent <ConsecutiveClickCoolTrigger>("Btn_Buy");
            _btnBuy.clickEvent.Add(new EventDelegate(OnBuyBtnClicked));
            _btnSprite   = _btnBuy.GetComponent <UISprite>();
            _diamondIcon = _btnBuy.transform.FindEx("Sprite").gameObject;
        }
Beispiel #20
0
        public override void Awake()
        {
            base.Awake();

            var t = controller.transform;

            isOpen        = false;
            ShowItem      = t.GetMonoILRComponent <LTShowItem>("DataPanel/Content/LTShowItem");
            HaveNumLabel  = t.GetComponent <UILabel>("DataPanel/Content/HasNum");
            DescTextLabel = t.GetComponent <UILabel>("DataPanel/Content/DescLabel");

            BG = t.GetComponent <UIWidget>("DataPanel/BG");

            t.GetComponent <UIEventTrigger>("Container").onClick.Add(new EventDelegate(OnCancelButtonClick));
        }
Beispiel #21
0
        public override void Awake()
        {
            base.Awake();

            var t = controller.transform;

            RewardsGrid      = t.GetComponent <UIGrid>("Content/AwardGrid");
            SureBtn          = t.GetComponent <UIButton>("Content/SureBtn");
            TipLabel         = t.GetComponent <UILabel>("Content/Tips");
            TitleLabel       = t.GetComponent <UILabel>("LTFrame/Content/Title/Title");
            ShowItemTemplate = t.GetMonoILRComponent <LTShowItem>("Content/LTShowItem");

            controller.backButton = t.GetComponent <UIButton>("LTFrame/Content/CloseBtn");
            t.GetComponent <UIButton>("Content/SureBtn").onClick.Add(new EventDelegate(OnConfirmBtn));
        }
Beispiel #22
0
        public override void Awake()
        {
            base.Awake();

            var t = mDMono.transform;

            NormalScale  = t.GetComponent <TweenScale>("CardNoOpen");
            OpenScale    = t.GetComponent <TweenScale>("Open");
            UIItem       = t.GetMonoILRComponent <LTShowItem>("Open/LTShowItem");
            PrivilegeObj = t.FindEx("Open/Border").gameObject;
            FxObj        = t.FindEx("fx").gameObject;

            t.GetComponent <TweenScale>("CardNoOpen").onFinished.Add(new EventDelegate(OnNormalAnimPlayed));
            t.GetComponent <TweenScale>("Open").onFinished.Add(new EventDelegate(OnOpenAnimPlayed));
        }
Beispiel #23
0
        public override void Awake()
        {
            base.Awake();

            BGTexture            = controller.transform.Find("BG_Texture").GetComponent <CampaignTextureCmp>();
            BGTexture.spriteName = "Game_Background_14";

            RoleIcon              = controller.transform.Find("Anchor_Mid/Info/Icon").GetComponent <UISprite>();
            TitleLabel            = controller.transform.Find("Anchor_Mid/Info/TipRoot").GetComponent <UILabel>();
            CurLevelLabel         = controller.transform.Find("Anchor_Mid/Info/TipRoot/LevelLabel").GetComponent <UILabel>();
            NextLevelLabe         = controller.transform.Find("Anchor_Mid/Info/TipRoot/LevelLabel (1)").GetComponent <UILabel>();
            ATKTitleLabel         = controller.transform.Find("Anchor_Mid/Info/AttrList/0/NameLabel").GetComponent <UILabel>();
            curAddATKLabel        = controller.transform.Find("Anchor_Mid/Info/AttrList/0/NumLabel").GetComponent <UILabel>();
            nextAddATKLabel       = controller.transform.Find("Anchor_Mid/Info/AttrList/0/EquipNumLabel").GetComponent <UILabel>();
            DefTitleLabel         = controller.transform.Find("Anchor_Mid/Info/AttrList/1/NameLabel").GetComponent <UILabel>();
            curAddDefLabel        = controller.transform.Find("Anchor_Mid/Info/AttrList/1/NumLabel").GetComponent <UILabel>();
            nextAddDefLabel       = controller.transform.Find("Anchor_Mid/Info/AttrList/1/EquipNumLabel").GetComponent <UILabel>();
            MaxHPTitleLabel       = controller.transform.Find("Anchor_Mid/Info/AttrList/2/NameLabel").GetComponent <UILabel>();
            curAddMAXHPLabel      = controller.transform.Find("Anchor_Mid/Info/AttrList/2/NumLabel").GetComponent <UILabel>();
            nextAddMaxHPLabel     = controller.transform.Find("Anchor_Mid/Info/AttrList/2/EquipNumLabel").GetComponent <UILabel>();
            BreakItem             = controller.transform.Find("Anchor_Mid/Info/LTShowItem").GetMonoILRComponent <LTShowItem>();
            BreakItemLabel        = controller.transform.Find("Anchor_Mid/Info/LTShowItem/CountLabel").GetComponent <UILabel>();
            RedPoint              = controller.transform.Find("Anchor_Mid/Info/BreakBtn/RedPoint").gameObject;
            BreakBtnLabel         = controller.transform.Find("Anchor_Mid/Info/BreakBtn/Label").GetComponent <UILabel>();
            UpLevelFx             = controller.transform.Find("BG_Texture/Uplevel").gameObject;
            controller.backButton = controller.transform.Find("Anchor_TopLeft/CancelBtn").GetComponent <UIButton>();
            GridTween             = controller.transform.Find("Anchor_Mid/Grid").GetComponent <TweenPosition>();
            Grid1Tween            = controller.transform.Find("Anchor_Mid/Grid (1)").GetComponent <TweenPosition>();
            HotfixBtn             = controller.transform.Find("Anchor_TopRight/Rule").GetComponent <UIButton>();
            HotfixBtn.onClick.Add(new EventDelegate(OnTipButtonClick));
            HotfixCoolBtn0 = controller.transform.Find("Anchor_Mid/Info/BreakBtn").GetComponent <ConsecutiveClickCoolTrigger>();
            HotfixCoolBtn0.clickEvent.Add(new EventDelegate(OnBreakThrouthBtnClick));
            lockDes       = controller.transform.Find("Anchor_BottomRight/LockDes").GetComponent <UILabel>();
            TonextObj     = controller.transform.Find("Anchor_BottomRight").gameObject;
            toNext        = controller.transform.Find("Anchor_BottomRight/Label").GetComponent <UILabel>();
            RightRedPoint = controller.transform.Find("Anchor_BottomRight/RightBtn/RedPoint").gameObject;
            controller.transform.Find("Anchor_BottomRight/RightBtn").GetComponent <ConsecutiveClickCoolTrigger>().clickEvent.Add(new EventDelegate(() => OnClickTurnthepageBtn(true)));
            toLast = controller.transform.Find("Anchor_BottomLeft/Label").GetComponent <UILabel>();
            controller.transform.Find("Anchor_BottomLeft/Label/LeftBtn").GetComponent <ConsecutiveClickCoolTrigger>().clickEvent.Add(new EventDelegate(() => OnClickTurnthepageBtn(false)));
            BreakBtnBox = HotfixCoolBtn0.GetComponent <BoxCollider>();
            MonoILRFunc();

            Vector2 v2 = GameUtils.GetPosWithConstrained(2730, 50);

            leftPos  = new Vector3(-v2.x, v2.y, 0);
            midPos   = new Vector3(0, v2.y, 0);
            rightPos = new Vector3(v2.x, v2.y, 0);
        }
Beispiel #24
0
        /// <summary>
        /// 刷新Item显示数据
        /// </summary>
        private void RefreshShowItem()
        {
            int num = curItemDataList.Count - ShowItemList.Count;

            if (num > 0)
            {
                GameObject obj = Object.Instantiate(ShowItemList[0].mDMono.gameObject);
                obj.transform.SetParent(Grid.transform);
                obj.transform.localPosition    = Vector3.zero;
                obj.transform.localEulerAngles = Vector3.zero;
                obj.transform.localScale       = Vector3.one;
                LTShowItem tempItem = obj.GetMonoILRComponent <LTShowItem>();
                ShowItemList.Add(tempItem);
            }

            for (int i = 0; i < ShowItemList.Count; i++)
            {
                if (i < curItemDataList.Count)
                {
                    ShowItemList[i].mDMono.gameObject.CustomSetActive(true);
                    ShowItemList[i].LTItemData = curItemDataList[i];
                }
                else
                {
                    ShowItemList[i].mDMono.gameObject.CustomSetActive(false);
                }
            }
            Grid.enabled = true;

            if (curItemDataList.Count <= MAXSHOWCOUNT && ScrollView.enabled)
            {
                ScrollView.enabled = false;
                ResetScoll();
            }

            if (curItemDataList.Count > MAXSHOWCOUNT)
            {
                ScrollView.enabled = true;
                ScrollView.ResetPosition();
            }
            TweenPosition Tweenr = Grid.gameObject.GetComponent <TweenPosition>();

            if (Tweenr != null)
            {
                Tweenr.ResetToBeginning();
                Tweenr.PlayForward();
            }
        }
Beispiel #25
0
        public override void Awake()
        {
            base.Awake();

            var t = mDMono.transform;

            Container        = t.FindEx("Container").gameObject;
            DartNameLabel    = t.GetComponent <UILabel>("Container/Name");
            DartQualityBG    = t.GetComponent <UISprite>("Container/BGs/CardBG (1)");
            PlayerLevelLabel = t.GetComponent <UILabel>("Container/TargetLevelBG/Level");
            HeroPortrait     = t.GetComponent <UISprite>("Container/TargetIconBG/Icon");
            FramePortrait    = t.GetComponent <UISprite>("Container/TargetIconBG/Icon/Frame");
            RewardItem1      = t.GetMonoILRComponent <LTShowItem>("Container/Award/LTShowItem");
            RewardItem2      = t.GetMonoILRComponent <LTShowItem>("Container/Award/LTShowItem (1)");
            t.GetComponent <UIButton>("Container/RobBtn").onClick.Add(new EventDelegate(() => t.parent.parent.GetMonoILRComponent <RobDartController>().OnRobClick(t.GetMonoILRComponent <RobDartItem>())));
        }
Beispiel #26
0
        public override void Awake()
        {
            base.Awake();
            var t = controller.transform;

            Icon            = t.GetComponent <DynamicUISprite>("Icon");
            Shadow          = Icon.transform.Find("Icon").gameObject;
            ArtifactName    = t.GetComponent <UILabel>("Name");
            DetailBehaviour = t.GetMonoILRComponent <ArtifactDetailBehaviour>("Container/Bg");
            ShowItem        = t.GetMonoILRComponent <LTShowItem>("LTShowItem");
            ShowItemCount   = t.GetComponent <UILabel>("LTShowItem/CountLabel");
            MaxTip          = t.FindEx("Container/Bg/MaxTip").gameObject;
            t.GetComponent <UIButton>("BG/CancelBtn").onClick.Add(new EventDelegate(OnCancelButtonClick));
            button   = t.GetComponent <ConsecutiveClickCoolTrigger>("Container/Bg/UpLevelBtn");
            redPoint = button.transform.Find("RedPoint").gameObject;
            button.clickEvent.Add(new EventDelegate(OnClickUpgrade));
        }
Beispiel #27
0
        public override void Awake()
        {
            base.Awake();

            var t = mDMono.transform;

            ShowItem  = t.GetMonoILRComponent <LTShowItem>("LTShowItem");
            SelectObj = t.FindEx("Select").gameObject;

            if (mDMono.ObjectParamList != null && mDMono.ObjectParamList.Count > 0)
            {
                var boxController  = ((GameObject)mDMono.ObjectParamList[0]).GetUIControllerILRComponent <LTSelectBoxController>();
                var cellController = t.GetMonoILRComponent <LTSelectBoxCellController>();

                t.GetComponent <UIButton>("LTShowItem").onClick.Add(new EventDelegate(() => boxController.OnClickSelectBoxItem(cellController)));
                t.GetComponentEx <UIEventTrigger>().onClick.Add(new EventDelegate(() => boxController.OnClickSelectBoxItem(cellController)));
            }
        }
Beispiel #28
0
 public override void Awake()
 {
     if (mDMono.ObjectParamList != null && mDMono.ObjectParamList.Count > 0)
     {
         if (mDMono.ObjectParamList.Count > 0 && mDMono.ObjectParamList[0] != null)
         {
             RewardItem1 = (mDMono.ObjectParamList[0] as GameObject).GetMonoILRComponent <LTShowItem>();
         }
         if (mDMono.ObjectParamList.Count > 1 && mDMono.ObjectParamList[1] != null)
         {
             RewardItem2 = (mDMono.ObjectParamList[1] as GameObject).GetMonoILRComponent <LTShowItem>();
         }
         if (mDMono.ObjectParamList.Count > 2 && mDMono.ObjectParamList[2] != null)
         {
             HcRewardLabel = (mDMono.ObjectParamList[2] as GameObject).GetComponent <UILabel>();
         }
     }
 }
Beispiel #29
0
        public override void Awake()
        {
            base.Awake();
            Btn = controller.transform.Find("Btn").GetComponent <UIButton>();
            Btn.onClick.Add(new EventDelegate(OnBtnClick));
            CostItem              = Btn.transform.Find("CostItem").GetMonoILRComponent <LTShowItem>();
            CostLabel             = Btn.transform.Find("Num").GetComponent <UILabel>();
            controller.backButton = controller.transform.Find("UINormalFrameBG/CancelBtn").GetComponent <UIButton>();
            ItemList              = new List <LTShowItem>();
            Transform ItemRoot = controller.transform.Find("ItemList");

            for (int i = 0; i < ItemRoot.childCount; ++i)
            {
                ItemList.Add(ItemRoot.GetChild(i).GetMonoILRComponent <LTShowItem>());
            }

            TurnTran = controller.transform.Find("Turn");
        }
Beispiel #30
0
        private void ShowReward()
        {
            if (mAwardDatas == null)
            {
                return;
            }

            if (mShowItemList == null)
            {
                mShowItemList = new List <LTShowItem>();
            }

            int count = mAwardDatas.Count - mShowItemList.Count;

            if (count > 0)
            {
                int num = mShowItemList.Count;

                for (int i = 0; i < count; i++)
                {
                    LTShowItem showItem = GameUtils.InstantiateEx <Transform>(ShowItemTemplate.mDMono.transform, RewardsGrid.transform, (num + i).ToString()).GetMonoILRComponent <LTShowItem>();;
                    mShowItemList.Add(showItem);
                }
            }


            for (int i = 0; i < mShowItemList.Count; ++i)
            {
                if (i < mAwardDatas.Count)
                {
                    mShowItemList[i].mDMono.gameObject.CustomSetActive(true);

                    var item = mAwardDatas[i];
                    mShowItemList[i].LTItemData = new LTShowItemData(item.id, item.count, item.type, false);
                }
                else
                {
                    mShowItemList[i].mDMono.gameObject.CustomSetActive(false);
                }
            }

            RewardsGrid.enabled = true;
        }