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

            var t = mDMono.transform;

            IconSprite      = t.GetComponent <UISprite>("Icon");
            FrameSprite     = t.GetComponent <UISprite>("Frame");
            FrameBGSprite   = t.GetComponent <UISprite>("FrameBG");
            LevelSprite     = t.GetComponent <UISprite>("HideObj/Property");
            LevelLabel      = t.GetComponent <UILabel>("HideObj/LevelSprite/LabelLevel");
            LevelBGSprite   = t.GetComponent <UISprite>("HideObj/LevelSprite");
            breakLebel      = t.GetComponent <UILabel>("HideObj/BreakObj/Break");
            StarController  = t.GetMonoILRComponent <LTPartnerStarController>("HideObj/StarList");
            SelectSpriteObj = t.FindEx("Select").gameObject;
            HideObj         = t.FindEx("HideObj").gameObject;
            RecommendSprite = t.FindEx("RecommendSprite").gameObject;
            DeathSprite     = t.FindEx("DeathSprite").gameObject;
            if (t.Find("HireSprite") != null)
            {
                HireSprite = t.FindEx("HireSprite").gameObject;
            }

            Transform ps = t.Find("ps");

            if (ps != null)
            {
                SleepPS = ps.gameObject;
            }

            Transform mercenarytemp = t.Find("Flag");

            if (mercenarytemp != null)
            {
                MercenaryUseFlag = mercenarytemp.gameObject;
            }

            Transform dragScroll = t.Find("Icon");

            if (dragScroll != null)
            {
                dragScrollView = dragScroll.GetComponent <UIDragScrollView>();

                DragClassifyEventDispatcher draDispatcher = dragScroll.GetComponent <DragClassifyEventDispatcher>();
                if (draDispatcher != null)
                {
                    draDispatcher.onDragFunc.Add(new EventDelegate(OnDrag));
                    draDispatcher.onDragStartFunc.Add(new EventDelegate(OnDragStart));
                    draDispatcher.onDragEndFunc.Add(new EventDelegate(OnDragEnd));
                }
            }

            if (IconSprite)
            {
                listener          = UIEventListener.Get(IconSprite.gameObject);
                listener.onClick += OnClick;
            }
        }
예제 #2
0
        public override void Awake()
        {
            base.Awake();

            var t = mDMono.transform;

            MainIcon       = t.GetComponent <DynamicUISprite>("Icon");
            QualityIcon    = t.GetComponent <UISprite>("Quality");
            StarController = t.GetMonoILRComponent <LTPartnerStarController>("Star");
            BG             = t.GetComponent <UISprite>("ContentBg");
            GradeIcon      = t.GetComponent <UISprite>();
            FrameBG        = t.GetComponent <UISprite>("Bg");

            t.GetComponent <UIButton>().onClick.Add(new EventDelegate(OnSelectBtnClick));
        }
예제 #3
0
        public override void Awake()
        {
            base.Awake();

            var t = mDMono.transform;

            IconSprite     = t.GetComponent <UISprite>("Icon");
            FrameSprite    = t.GetComponent <UISprite>("Frame");
            FrameBGSprite  = t.GetComponent <UISprite>("FrameBG");
            CharTypeSprite = t.GetComponent <UISprite>("Property");
            LevelLabel     = t.GetComponent <UILabel>("LevelSprite/LabelLevel");
            breakLebel     = t.GetComponent <UILabel>("Break");
            StarController = t.GetMonoILRComponent <LTPartnerStarController>("StarList");

            t.GetComponent <UIButton>().onClick.Add(new EventDelegate(() => { EnemyInfoItemClick(); }));
        }
예제 #4
0
        public override void Awake()
        {
            base.Awake();
            var t = mDMono.transform;

            BgSprite  = t.GetComponent <UISprite>();
            HeroName  = t.GetComponent <UILabel>("heroName");
            GradeIcon = t.GetComponent <UISprite>("HeroGrade");

            HeroIcon         = t.GetComponent <UISprite>("Item/Icon");
            HeroType         = t.GetComponent <UISprite>("Item/Property");
            HeroIconBorder   = t.GetComponent <UISprite>("Item/Frame");
            HeriIconBorderBG = t.GetComponent <UISprite>("Item/FrameBG");
            StarController   = t.GetMonoILRComponent <LTPartnerStarController>("Item/StarList");;
            BreakLabel       = t.GetComponent <UILabel>("Item/BreakObj/Break");
            HeroLevel        = t.GetComponent <UILabel>("Item/LevelSprite/LabelLevel");

            redPoint = t.FindEx("Item/RedPoint").gameObject;
            // AddListener();
        }
예제 #5
0
        public override void Awake()
        {
            base.Awake();

            var t = mDMono.transform;

            IconSprite     = t.GetComponent <UISprite>("Icon");
            FrameSprite    = t.GetComponent <UISprite>("Frame");
            FrameBGSprite  = t.GetComponent <UISprite>("FrameBG");
            LevelSprite    = t.GetComponent <UISprite>("Property");
            LevelLabel     = t.GetComponent <UILabel>("LevelSprite/LabelLevel");
            breakLebel     = t.GetComponent <UILabel>("BreakObj/Break");
            StarController = t.GetMonoILRComponent <LTPartnerStarController>("StarList");
            CallLabel      = t.GetComponent <UILabel>("CallLabel");
            ShardSlider    = t.GetComponent <UISlider>("ProgressBar");
            ShardSprite    = t.GetComponent <UISprite>("ProgressBar/Sprite");
            ShardLabel     = t.GetComponent <UILabel>("ProgressBar/Label");
            SelectSprite   = t.GetComponent <UISprite>("Select");

            var flag     = t.Find("FormationFlag");
            var redPoint = t.Find("RedPoint");
            var btn      = t.GetComponent <UIButton>();

            if (flag != null)
            {
                FormationFlagObj = flag.gameObject;
            }

            if (redPoint != null)
            {
                RedPoint = redPoint.gameObject;
            }

            if (btn != null)
            {
                btn.onClick.Add(new EventDelegate(OnBtnClick));
            }
            Hotfix_LT.Messenger.AddListener <int>(Hotfix_LT.EventName.OnPartnerSelect, OnPartnerSelectFunc);
            Hotfix_LT.Messenger.AddListener <bool, bool>(Hotfix_LT.EventName.OnRefreshPartnerCellRP, OnRefreshPartnerRP);
        }