Exemplo n.º 1
0
        public override void Awake()
        {
            base.Awake();
            var t = controller.transform;

            controller.backButton = t.GetComponent <UIButton>("Edge/TopLeft/BackBtn");

            HpCtrl         = t.GetMonoILRComponent <LTChallengeInstanceHpCtrl>("Edge/PlayerPanel/Panel/Hp");
            FullScreenMask = t.FindEx("Edge/HidePanel/FullScreenMask").gameObject;

            SkipSprite        = t.GetComponent <UISprite>("Edge/BottomLeft/SkipBtn/Check");
            QuickSprite       = t.GetComponent <UISprite>("Edge/BottomLeft/QuickBtn/Check");
            QuickContainerObj = t.gameObject.FindEx("Edge/BottomLeft/QuickBtn");
            BossLogBtnObj     = t.gameObject.FindEx("Edge/BottomRight/BossLog");
            BossLogGuideTS    = t.GetComponent <TweenScale>("Edge/BottomRight/BossLog/TipLabel");

            ThemeNameLabel    = t.GetComponent <UILabel>("Edge/TopLeft/Theme/Label");
            ThemeIcon         = t.GetComponent <DynamicUISprite>("Edge/TopLeft/Theme/Icon");
            ThemeTipNameLabel = t.GetComponent <UILabel>("Edge/TopLeft/Theme/Tips/NameLabel");
            ThemeTipsIcon     = t.GetComponent <DynamicUISprite>("Edge/TopLeft/Theme/Tips/Theme/Icon");
            ThemeTipDescLabel = t.GetComponent <UILabel>("Edge/TopLeft/Theme/Tips/DescLabel");
            ThemeTipObj       = t.gameObject.FindEx("Edge/TopLeft/Theme/Tips");

            FlyMagicObj     = t.gameObject.FindEx("Edge/BottomRight/BagBtn/Magic/Fly");
            FlyMagicsObj    = t.gameObject.FindEx("Edge/BottomRight/BagBtn/Magic/Fly2");
            MagicObj        = t.gameObject.FindEx("Edge/BottomRight/BagBtn/Magic");
            BottomRightObj  = t.gameObject.FindEx("Edge/BottomRight");
            SpCtrl          = t.GetDataLookupILRComponent <LTChallengeSPCtrl>("Edge/BottomRight/BagBtn/Magic/Label");
            MagicAlphaTween = t.GetComponent <TweenAlpha>("Edge/BottomRight/BagBtn/Magic");
            FlyScrollObj    = t.gameObject.FindEx("Edge/BottomRight/BagBtn/ScrollFly");
            MagnifyingGlass = t.gameObject.FindEx("Edge/PlayerPanel/Panel/MagnifyingGlass");

            EnemyKillSpriteList = controller.FetchComponentList <UISprite>(new string[5] {
                "Edge/Bottom/DoorBar/Root/Enemy", "Edge/Bottom/DoorBar/Root/Enemy (1)", "Edge/Bottom/DoorBar/Root/Enemy (2)", "Edge/Bottom/DoorBar/Root/Enemy (3)", "Edge/Bottom/DoorBar/Root/Enemy (4)"
            }); new List <UISprite>();
            KeySprite        = t.GetComponent <UISprite>("Edge/Bottom/DoorBar/Key");
            KeyFxObj         = KeySprite.gameObject.FindEx("FX");
            BarFxObj         = t.gameObject.FindEx("Edge/Bottom/DoorBar/Foreground/FX");
            DoorOpenProgress = t.GetComponent <UIProgressBar>("Edge/Bottom/DoorBar");

            _clearanceLineupBtn = t.GetMonoILRComponent <LTClearanceLineupBtn>("Edge/TopRight/LTClearanceLineupBtn");

            controller.FindAndBindingBtnEvent(new List <string>(6)
            {
                "Edge/TopLeft/Theme", "Edge/TopLeft/Theme/Tips/Box",
                "Edge/BottomLeft/SkipBtn", "Edge/BottomLeft/QuickBtn", "Edge/BottomRight/BagBtn", "Edge/BottomRight/BattleReadyBtn", "Edge/BottomRight/BossLog"
            },
                                              new List <EventDelegate>(6)
            {
                new EventDelegate(OnThemeBtnClick), new EventDelegate(OnThemeTipClick),
                new EventDelegate(OnSkipBtnClick), new EventDelegate(OnQuickBtnClick), new EventDelegate(OnBagBtnClick), new EventDelegate(OnBattleReadyBtnClick), new EventDelegate(OnBossLogBtnClick)
            });
        }
Exemplo n.º 2
0
        public override void Awake()
        {
            base.Awake();
            var t = controller.transform;

            controller.backButton = t.GetComponent <UIButton>("Edge/TopLeft/BackBtn");

            HpCtrl         = t.GetMonoILRComponent <LTChallengeInstanceHpCtrl>("Edge/PlayerPanel/Panel/Hp");
            FullScreenMask = t.FindEx("Edge/HidePanel/FullScreenMask").gameObject;

            SkipSprite = t.GetComponent <UISprite>("Edge/BottomLeft/SkipBtn/Check");

            ThemeNameLabel    = t.GetComponent <UILabel>("Edge/TopLeft/Theme/Label");
            ThemeIcon         = t.GetComponent <UISprite>("Edge/TopLeft/Theme");
            ThemeTipNameLabel = t.GetComponent <UILabel>("Edge/TopLeft/Theme/Tips/NameLabel");
            ThemeTipsIcon     = t.GetComponent <UISprite>("Edge/TopLeft/Theme/Tips/Theme");
            ThemeTipDescLabel = t.GetComponent <UILabel>("Edge/TopLeft/Theme/Tips/DescLabel");
            ThemeTipObj       = t.FindEx("Edge/TopLeft/Theme/Tips").gameObject;

            FlyMagicObj     = t.FindEx("Edge/BottomRight/BagBtn/Magic/Fly").gameObject;
            FlyMagicsObj    = t.FindEx("Edge/BottomRight/BagBtn/Magic/Fly2").gameObject;
            MagicObj        = t.FindEx("Edge/BottomRight/BagBtn/Magic").gameObject;
            BottomRightObj  = t.FindEx("Edge/BottomRight").gameObject;
            SpCtrl          = t.GetDataLookupILRComponent <LTChallengeSPCtrl>("Edge/BottomRight/BagBtn/Magic/Label");
            MagicAlphaTween = t.GetComponent <TweenAlpha>("Edge/BottomRight/BagBtn/Magic");
            FlyScrollObj    = t.FindEx("Edge/BottomRight/BagBtn/ScrollFly").gameObject;
            MagnifyingGlass = t.FindEx("Edge/PlayerPanel/Panel/MagnifyingGlass").gameObject;

            controller.FindAndBindingBtnEvent(new List <string>(6)
            {
                "Edge/TopLeft/Theme", "Edge/TopLeft/Theme/Tips/Box",
                "Edge/TopRight/RuleBtn", "Edge/BottomLeft/SkipBtn", "Edge/BottomRight/BagBtn", "Edge/BottomRight/BattleReadyBtn"
            },
                                              new List <EventDelegate>(6)
            {
                new EventDelegate(OnThemeBtnClick), new EventDelegate(OnThemeTipClick),
                new EventDelegate(OnRuleBtnClick), new EventDelegate(OnSkipBtnClick), new EventDelegate(OnBagBtnClick), new EventDelegate(OnBattleReadyBtnClick)
            });
        }