private void Awake()
        {
            unitsProtoData = Data.DataManager.GetInstance().unitsProtoData;

            bgButton           = transform.Find("BgButton").GetComponent <Button>();
            playBackButton     = transform.Find("PlayBackButton").GetComponent <Button>();
            battleResultButton = transform.Find("BattleResultButton").GetComponent <Button>();
            playerIcon         = transform.Find("PlayerIcon").GetComponent <Image>();
            winIcon            = transform.Find("WinIcon").GetComponent <Image>();
            failIcon           = transform.Find("FailIcon").GetComponent <Image>();
            deathCountText     = transform.Find("DeathCountText").GetComponent <Text>();
            battleModeText     = transform.Find("BattleModeText").GetComponent <Text>();
            battleScoreText    = transform.Find("BattleScoreText").GetComponent <Text>();
            dateText           = transform.Find("DateText").GetComponent <Text>();
            unitTransformObj   = transform.Find("UnitTransform").gameObject;
            unitTransformObj.SetActive(false);
            unitIconArray[0] = transform.Find("UnitTransform/UnitGroup/UnitIcon1/UnitIcon").GetComponent <Image>();
            unitIconArray[1] = transform.Find("UnitTransform/UnitGroup/UnitIcon2/UnitIcon").GetComponent <Image>();
            unitIconArray[2] = transform.Find("UnitTransform/UnitGroup/UnitIcon3/UnitIcon").GetComponent <Image>();
            unitIconArray[3] = transform.Find("UnitTransform/UnitGroup/UnitIcon4/UnitIcon").GetComponent <Image>();
            unitIconArray[4] = transform.Find("UnitTransform/UnitGroup/UnitIcon5/UnitIcon").GetComponent <Image>();
            unitIconArray[5] = transform.Find("UnitTransform/UnitGroup/UnitIcon6/UnitIcon").GetComponent <Image>();
            unitIconArray[6] = transform.Find("UnitTransform/UnitGroup/UnitIcon7/UnitIcon").GetComponent <Image>();
            unitIconArray[7] = transform.Find("UnitTransform/UnitGroup/UnitIcon8/UnitIcon").GetComponent <Image>();
            unitIconArray[8] = transform.Find("UnitTransform/UnitGroup/UnitIcon9/UnitIcon").GetComponent <Image>();

            playBackButton.AddListener(ClickPlayBackButton);
            battleResultButton.AddListener(ClickBattleResultButton);

            ClickHandler.Get(bgButton.gameObject).onClickDown = ClickBgButtonDown;
            ClickHandler.Get(bgButton.gameObject).onClickUp   = ClickBgButtonUp;
        }
Beispiel #2
0
 public void SetCardItem(SpecialCardItem item)
 {
     specialCard = item;
     ClickHandler.Get(item.gameObject).onClickDown = OnClickDown;
     ClickHandler.Get(item.gameObject).onClickUp   = OnClickUp;
     mark = DataManager.GetInstance().GetForceMark();
 }
    // Start is called before the first frame update
    void Start()
    {
        Texture2D t2d = Resources.Load <Texture2D>("TestClickMask");

        ClickHandler.Get(this.gameObject).OnClickAction.AddListener(CheckIsBlocked);
        tms = transform.GetOrAdd <TextureMaskSampler>();
        tms.Init();
    }
 public void CloseSkillTrainingButton()
 {
     SetGrayMode3(true);
     ClickHandler.Get(modeButton3.gameObject).onClickDown = null;
     ClickHandler.Get(modeButton3.gameObject).onClickUp   = null;
     modeButton3.onClick.RemoveListener(OnClickModeBt3);
     mode3Image.SetGray(true);
 }
 public void CloseJungleTrainingButton()
 {
     SetGrayMode4(true);
     ClickHandler.Get(modeButton4.gameObject).onClickDown = null;
     ClickHandler.Get(modeButton4.gameObject).onClickUp   = null;
     modeButton4.onClick.RemoveListener(OnClickModeBt4);
     mode4Image.SetGray(true);
 }
 public void CloseBuildingTrainingButton()
 {
     SetGrayMode2(true);
     ClickHandler.Get(modeButton2.gameObject).onClickDown = null;
     ClickHandler.Get(modeButton2.gameObject).onClickUp   = null;
     modeButton2.onClick.RemoveListener(OnClickModeBt2);
     mode2Image.SetGray(true);
 }
 public void OpenJungleTrainingButton()
 {
     SetGrayMode4(true);
     ClickHandler.Get(modeButton4.gameObject).onClickDown = OnClickDownModeBt4;
     ClickHandler.Get(modeButton4.gameObject).onClickUp   = OnClickUpModeBt4;
     modeButton4.AddListener(OnClickModeBt4);
     mode4Image.SetGray(false);
 }
 public void OpenSkillTrainingButton()
 {
     SetGrayMode3(true);
     ClickHandler.Get(modeButton3.gameObject).onClickDown = OnClickDownModeBt3;
     ClickHandler.Get(modeButton3.gameObject).onClickUp   = OnClickUpModeBt3;
     modeButton3.AddListener(OnClickModeBt3);
     mode3Image.SetGray(false);
 }
 public void OpenBuildingTrainingButton()
 {
     SetGrayMode2(true);
     ClickHandler.Get(modeButton2.gameObject).onClickDown = OnClickDownModeBt2;
     ClickHandler.Get(modeButton2.gameObject).onClickUp   = OnClickUpModeBt2;
     modeButton2.AddListener(OnClickModeBt2);
     mode2Image.SetGray(false);
 }
        public override void OnInit()
        {
            base.OnInit();
            controller  = new TutorialModeController(this);
            _controller = controller;

            modeTran1          = transform.Find("ModeGroup/ModeObj1");
            modeIcon1          = modeTran1.Find("FrameImage/ModeIcon").GetComponent <Image>();
            modeTextImage1     = modeTran1.Find("FrameImage/ModeTextImage").GetComponent <Image>();
            grayModeIcon1      = modeTran1.Find("FrameImage/GrayModeIcon").GetComponent <Image>();
            grayModeTextImage1 = modeTran1.Find("FrameImage/GrayModeTextImage").GetComponent <Image>();
            modeBg1            = modeTran1.Find("FrameImage/ModeBackground").GetComponent <Image>();
            grayModeBg1        = modeTran1.Find("FrameImage/GrayModeBackground").GetComponent <Image>();
            modeButton1        = modeTran1.Find("ModeButton").GetComponent <Button>();

            modeTran2          = transform.Find("ModeGroup/ModeObj2");
            modeIcon2          = modeTran2.Find("FrameImage/ModeIcon").GetComponent <Image>();
            modeTextImage2     = modeTran2.Find("FrameImage/ModeTextImage").GetComponent <Image>();
            grayModeIcon2      = modeTran2.Find("FrameImage/GrayModeIcon").GetComponent <Image>();
            grayModeTextImage2 = modeTran2.Find("FrameImage/GrayModeTextImage").GetComponent <Image>();
            modeBg2            = modeTran2.Find("FrameImage/ModeBackground").GetComponent <Image>();
            grayModeBg2        = modeTran2.Find("FrameImage/GrayModeBackground").GetComponent <Image>();
            modeButton2        = modeTran2.Find("ModeButton").GetComponent <Button>();
            mode2Image         = modeButton2.GetComponent <Image>();

            modeTran3          = transform.Find("ModeGroup/ModeObj3");
            modeIcon3          = modeTran3.Find("FrameImage/ModeIcon").GetComponent <Image>();
            modeTextImage3     = modeTran3.Find("FrameImage/ModeTextImage").GetComponent <Image>();
            grayModeIcon3      = modeTran3.Find("FrameImage/GrayModeIcon").GetComponent <Image>();
            grayModeTextImage3 = modeTran3.Find("FrameImage/GrayModeTextImage").GetComponent <Image>();
            modeBg3            = modeTran3.Find("FrameImage/ModeBackground").GetComponent <Image>();
            grayModeBg3        = modeTran3.Find("FrameImage/GrayModeBackground").GetComponent <Image>();
            modeButton3        = modeTran3.Find("ModeButton").GetComponent <Button>();
            mode3Image         = modeButton3.GetComponent <Image>();

            modeTran4          = transform.Find("ModeGroup/ModeObj4");
            modeIcon4          = modeTran4.Find("FrameImage/ModeIcon").GetComponent <Image>();
            modeTextImage4     = modeTran4.Find("FrameImage/ModeTextImage").GetComponent <Image>();
            grayModeIcon4      = modeTran4.Find("FrameImage/GrayModeIcon").GetComponent <Image>();
            grayModeTextImage4 = modeTran4.Find("FrameImage/GrayModeTextImage").GetComponent <Image>();
            modeBg4            = modeTran4.Find("FrameImage/ModeBackground").GetComponent <Image>();
            grayModeBg4        = modeTran4.Find("FrameImage/GrayModeBackground").GetComponent <Image>();
            modeButton4        = modeTran4.Find("ModeButton").GetComponent <Button>();
            mode4Image         = modeButton4.GetComponent <Image>();

            SetGrayMode1(true);
            ClickHandler.Get(modeButton1.gameObject).onClickDown = OnClickDownModeBt1;
            ClickHandler.Get(modeButton1.gameObject).onClickUp   = OnClickUpModeBt1;
            modeButton1.AddListener(OnClickModeBt1);

            CloseBuildingTrainingButton();
            CloseSkillTrainingButton();
            CloseJungleTrainingButton();
        }
Beispiel #11
0
        public override void OnInit()
        {
            _controller = new BattleCommandControler(this);
            controler   = _controller as BattleCommandControler;

            commandRoot = transform.Find("ControlAni/Command");
            commandIcon = commandRoot.Find("IconImage").GetComponent <Image>();
            ClickHandler.Get(commandIcon.gameObject).onClickDown = OnClickDownCommandIcon;
            ClickHandler.Get(commandIcon.gameObject).onClickUp   = OnClickUpCommandIcon;
            commandSelectObj = commandRoot.Find("SelectedImage").gameObject;
            buttonGroup      = transform.Find("ControlAni/ButtonGroup");
            retreatButton    = buttonGroup.Find("RetreatButton").GetComponent <Image>();
            ClickHandler.Get(retreatButton.gameObject).onEnter = OnEnterRetreatButton;
            ClickHandler.Get(retreatButton.gameObject).onExit  = OnExitRetreatButton;
            defenseButton = buttonGroup.Find("DefenseButton").GetComponent <Image>();
            ClickHandler.Get(defenseButton.gameObject).onEnter = OnEnterDefenseButton;
            ClickHandler.Get(defenseButton.gameObject).onExit  = OnExitDefenseButton;
            attackButton = buttonGroup.Find("AttackButton").GetComponent <Image>();
            ClickHandler.Get(attackButton.gameObject).onEnter = OnEnterAttackButton;
            ClickHandler.Get(attackButton.gameObject).onExit  = OnExitAttackButton;
            retreatButtonCD = buttonGroup.Find("RetreatButtonCD").GetComponent <Image>();
            defenseButtonCD = buttonGroup.Find("DefenseButtonCD").GetComponent <Image>();
            attackButtonCD  = buttonGroup.Find("AttackButtonCD").GetComponent <Image>();
            retreatSelect   = buttonGroup.Find("RetreatSelect").gameObject;
            defenseSelect   = buttonGroup.Find("DefenseSelect").gameObject;
            attackSelect    = buttonGroup.Find("AttackSelect").gameObject;
            sneerRoot       = transform.Find("ControlAni/Sneer");
            sneerIconBtn    = sneerRoot.Find("IconImage").GetComponent <Button>();
            sneerIconBtn.AddListener(OnClickSneerIconBtn);
            greetingCDImage = sneerRoot.Find("IconImageCD").GetComponent <Image>();
            greetingRoot    = sneerRoot.Find("GreetingRoot");
            greetingContent = greetingRoot.Find("ScrollView/Viewport/Content");
            zhiJiaoBtn      = greetingContent.Find("ZhiJiao").GetComponent <Button>();
            zhiJiaoBtn.AddListener(OnClickZhiJiaoBtn);
            niceWorkBtn = greetingContent.Find("NiceWork").GetComponent <Button>();
            niceWorkBtn.AddListener(OnClickNiceWorkBtn);
            FaultBtn = greetingContent.Find("Fault").GetComponent <Button>();
            FaultBtn.AddListener(OnClickFaultBtn);
            goodLuckBtn = greetingContent.Find("GoodLuck").GetComponent <Button>();
            goodLuckBtn.AddListener(OnClickGoodLuckBtn);
            goodGameBtn = greetingContent.Find("GoodGame").GetComponent <Button>();
            goodGameBtn.AddListener(OnClickGoodGameBtn);
            ShowGreetingRoot(false);
            concentratedFireRoot = transform.Find("ControlAni/ConcentratedFire");
            concentratedFireBtn  = concentratedFireRoot.Find("IconImage").GetComponent <Button>();
            concentratedFireBtn.AddListener(OnClickConcentratedFireBtn);
            backCityRoot = transform.Find("ControlAni/BackCity");
            backCityBtn  = backCityRoot.Find("IconImage").GetComponent <Button>();
            backCityBtn.AddListener(OnClickBackCityBtn);
            ShowButtonGroup(false);
        }
Beispiel #12
0
 public override void OnInit()
 {
     headImage   = transform.Find("HeadBgImage/HeadImage").GetComponent <Image>();
     bgHeadImage = headImage.sprite;
     ClickHandler.Get(headImage.gameObject).onClickDown = OnHeadImageClickDown;
     ClickHandler.Get(headImage.gameObject).onClickUp   = OnHeadImageClickUp;
     hpImage          = transform.Find("HpImage").GetComponent <Image>();
     selectedImage    = transform.Find("SelectedImage").gameObject;
     bigRoot          = transform.Find("BigRoot").gameObject;
     bigHeadImageRoot = bigRoot.transform.Find("BigHeadImageRoot").GetComponent <Image>();
     bigHeadImage     = bigHeadImageRoot.transform.Find("BigHeadImage").GetComponent <Image>();
     ClickHandler.Get(bigHeadImage.gameObject).onEnter = OnBigHeadEnter;
     ClickHandler.Get(bigHeadImage.gameObject).onExit  = OnBigHeadExit;
     nameText   = bigRoot.transform.Find("NameBgImage/Text").GetComponent <Text>();
     bigHpImage = bigRoot.transform.Find("BigHpImage").GetComponent <Image>();
 }
Beispiel #13
0
        //private const string STORE_ITEM_PATH = "Prefabs/UI/StoreScreenItem/Store_Item";
        //private const string STORE_RUNE_ITEM_PATH = "Prefabs/UI/StoreScreenItem/Rune_Item";
        //private const string STORE_SELLING_ITEM_PATH = "Prefabs/UI/StoreScreenItem/Selling_Item";
        #endregion

        public override void OnInit()
        {
            base.OnInit();
            controller  = new StoreController(this);
            _controller = controller;

            #region Store UI
            storeTran     = transform.Find("StoreUI");
            recommendText = storeTran.Find("TypeTextGroup/ReCommendText").GetComponent <Text>();
            unitText      = storeTran.Find("TypeTextGroup/UnitText").GetComponent <Text>();
            skinText      = storeTran.Find("TypeTextGroup/SkinText").GetComponent <Text>();
            boxText       = storeTran.Find("TypeTextGroup/BoxText").GetComponent <Text>();
            runeText      = storeTran.Find("TypeTextGroup/RuneText").GetComponent <Text>();
            debrisText    = storeTran.Find("TypeTextGroup/DebrisText").GetComponent <Text>();

            recommendToggle = storeTran.Find("GoodsTypeToggleGroup/ReCommendToggle").GetComponent <Toggle>();
            unitToggle      = storeTran.Find("GoodsTypeToggleGroup/UnitToggle").GetComponent <Toggle>();
            skinToggle      = storeTran.Find("GoodsTypeToggleGroup/SkinToggle").GetComponent <Toggle>();
            boxToggle       = storeTran.Find("GoodsTypeToggleGroup/BoxToggle").GetComponent <Toggle>();
            runeToggle      = storeTran.Find("GoodsTypeToggleGroup/RuneToggle").GetComponent <Toggle>();
            debrisToggle    = storeTran.Find("GoodsTypeToggleGroup/DebrisToggle").GetComponent <Toggle>();

            recommendToggle.AddListener(OnClickReCommendTg);
            unitToggle.AddListener(OnClickUnitTg);
            skinToggle.AddListener(OnClickSkinTg);
            boxToggle.AddListener(OnClickBoxTg);
            runeToggle.AddListener(OnClickRuneTg);
            debrisToggle.AddListener(OnClickDebrisTg);
            #endregion

            #region Box UI
            boxTran      = transform.Find("BoxUI");
            dragBoxPanel = boxTran.Find("DragBoxPanel").GetComponent <ScrollRect>();
            boxItemGroup = boxTran.Find("DragBoxPanel/ItemGroup").GetComponent <GridLayoutGroup>();
            #endregion

            #region Recommend UI
            recommendTran         = transform.Find("RecommendUI");
            posLeft               = recommendTran.Find("CarouselTexture/PosLeft");
            posMiddle             = recommendTran.Find("CarouselTexture/PosMiddle");
            posRight              = recommendTran.Find("CarouselTexture/PosRight");
            goodsGroup            = recommendTran.Find("DragNewGoodsPanel/GoodsItemGroup").GetComponent <GridLayoutGroup>();
            sellingsGroup         = recommendTran.Find("DragSellingPanel/SellingItemGroup").GetComponent <GridLayoutGroup>();
            caroudeImages[0]      = recommendTran.Find("CarouselTexture/Image1").GetComponent <Image>();
            caroudeImages[1]      = recommendTran.Find("CarouselTexture/Image2").GetComponent <Image>();
            caroudeImages[2]      = recommendTran.Find("CarouselTexture/Image3").GetComponent <Image>();
            textureIndexImages[0] = recommendTran.Find("TextureIndexObjGroup/IndexObj1/SelectImage").GetComponent <Image>();
            textureIndexImages[1] = recommendTran.Find("TextureIndexObjGroup/IndexObj2/SelectImage").GetComponent <Image>();
            textureIndexImages[2] = recommendTran.Find("TextureIndexObjGroup/IndexObj3/SelectImage").GetComponent <Image>();
            newGoodsText          = recommendTran.Find("NewGoodsText").GetComponent <Text>();
            sellingText           = recommendTran.Find("SellingText").GetComponent <Text>();

            ClickHandler.Get(caroudeImages[0].gameObject).onDrag = DragImage;
            ClickHandler.Get(caroudeImages[1].gameObject).onDrag = DragImage;
            ClickHandler.Get(caroudeImages[2].gameObject).onDrag = DragImage;
            #endregion

            #region Unit UI
            unitTran      = transform.Find("UnitUI");
            dragUnitPanel = unitTran.Find("DragUnitPanel").GetComponent <ScrollRect>();
            unitGroup     = unitTran.Find("DragUnitPanel/UnitItemGroup").GetComponent <GridLayoutGroup>();
            Transform unitTg = unitTran.Find("ToggleGroup");
            warriorTg_u       = unitTg.Find("WarriorToggle").GetComponent <Toggle>();
            assassinTg_u      = unitTg.Find("AssassinToggle").GetComponent <Toggle>();
            shooterTg_u       = unitTg.Find("ShooterToggle").GetComponent <Toggle>();
            masterTg_u        = unitTg.Find("MasterToggle").GetComponent <Toggle>();
            auxiliaryTg_u     = unitTg.Find("AuxiliaryToggle").GetComponent <Toggle>();
            warriorTgText_u   = unitTg.Find("WarriorToggle/TypeText").GetComponent <Text>();
            assassinTgText_u  = unitTg.Find("AssassinToggle/TypeText").GetComponent <Text>();
            shooterTgText_u   = unitTg.Find("ShooterToggle/TypeText").GetComponent <Text>();
            masterTgText_u    = unitTg.Find("MasterToggle/TypeText").GetComponent <Text>();
            auxiliaryTgText_u = unitTg.Find("AuxiliaryToggle/TypeText").GetComponent <Text>();

            warriorTg_u.AddListener(OnClickWarriorTg_U);
            assassinTg_u.AddListener(OnClickAssassinTg_U);
            shooterTg_u.AddListener(OnClickShooterTg_U);
            masterTg_u.AddListener(OnClickMasterTg_U);
            auxiliaryTg_u.AddListener(OnClickAuxiliaryTg_U);
            #endregion

            #region Skin UI
            skinTran      = transform.Find("SkinUI");
            dragSkinPanel = skinTran.Find("DragSkinPanel").GetComponent <ScrollRect>();
            skinGroup     = skinTran.Find("DragSkinPanel/SkinItemGroup").GetComponent <GridLayoutGroup>();
            Transform tgSTran = skinTran.Find("ToggleGroup");
            warriorTg_s       = tgSTran.Find("WarriorToggle").GetComponent <Toggle>();
            assassinTg_s      = tgSTran.Find("AssassinToggle").GetComponent <Toggle>();
            shooterTg_s       = tgSTran.Find("ShooterToggle").GetComponent <Toggle>();
            masterTg_s        = tgSTran.Find("MasterToggle").GetComponent <Toggle>();
            auxiliaryTg_s     = tgSTran.Find("AuxiliaryToggle").GetComponent <Toggle>();
            warriorTgText_s   = tgSTran.Find("WarriorToggle/TypeText").GetComponent <Text>();
            assassinTgText_s  = tgSTran.Find("AssassinToggle/TypeText").GetComponent <Text>();
            shooterTgText_s   = tgSTran.Find("ShooterToggle/TypeText").GetComponent <Text>();
            masterTgText_s    = tgSTran.Find("MasterToggle/TypeText").GetComponent <Text>();
            auxiliaryTgText_s = tgSTran.Find("AuxiliaryToggle/TypeText").GetComponent <Text>();

            warriorTg_s.AddListener(OnClickWarriorTg_S);
            assassinTg_s.AddListener(OnClickAssassinTg_S);
            shooterTg_s.AddListener(OnClickShooterTg_S);
            masterTg_s.AddListener(OnClickMasterTg_S);
            auxiliaryTg_s.AddListener(OnClickAuxiliaryTg_S);
            #endregion

            #region Rune UI
            runeTran      = transform.Find("RuneUI");
            dragRunePanel = runeTran.Find("DragRunePanel").GetComponent <ScrollRect>();
            runeGroup     = runeTran.Find("DragRunePanel/RuneItemGroup").GetComponent <GridLayoutGroup>();

            Transform tgRTran = runeTran.Find("TypeToggleGroup");
            physicalTg_r      = tgRTran.Find("PhysicalToggle").GetComponent <Toggle>();
            magicTg_r         = tgRTran.Find("MagicToggle").GetComponent <Toggle>();
            critTg_r          = tgRTran.Find("CritToggle").GetComponent <Toggle>();
            atkSpeedTg_r      = tgRTran.Find("AtkSpeedToggle").GetComponent <Toggle>();
            moveSpeedTg_r     = tgRTran.Find("MoveSpeedToggle").GetComponent <Toggle>();
            physicalTgText_r  = tgRTran.Find("PhysicalToggle/TypeText").GetComponent <Text>();
            magicTgText_r     = tgRTran.Find("MagicToggle/TypeText").GetComponent <Text>();
            critTgText_r      = tgRTran.Find("CritToggle/TypeText").GetComponent <Text>();
            atkSpeedTgText_r  = tgRTran.Find("AtkSpeedToggle/TypeText").GetComponent <Text>();
            moveSpeedTgText_r = tgRTran.Find("MoveSpeedToggle/TypeText").GetComponent <Text>();

            lv1Tg_r = runeTran.Find("ToggleGroup/Level1Toggle").GetComponent <Toggle>();
            lv2Tg_r = runeTran.Find("ToggleGroup/Level2Toggle").GetComponent <Toggle>();
            lv3Tg_r = runeTran.Find("ToggleGroup/Level3Toggle").GetComponent <Toggle>();
            lv4Tg_r = runeTran.Find("ToggleGroup/Level4Toggle").GetComponent <Toggle>();
            lv5Tg_r = runeTran.Find("ToggleGroup/Level5Toggle").GetComponent <Toggle>();
            lv6Tg_r = runeTran.Find("ToggleGroup/Level6Toggle").GetComponent <Toggle>();

            lv1TgText = runeTran.Find("ToggleGroup/Level1Toggle/ToggleText").GetComponent <Text>();
            lv2TgText = runeTran.Find("ToggleGroup/Level2Toggle/ToggleText").GetComponent <Text>();
            lv3TgText = runeTran.Find("ToggleGroup/Level3Toggle/ToggleText").GetComponent <Text>();
            lv4TgText = runeTran.Find("ToggleGroup/Level4Toggle/ToggleText").GetComponent <Text>();
            lv5TgText = runeTran.Find("ToggleGroup/Level5Toggle/ToggleText").GetComponent <Text>();
            lv6TgText = runeTran.Find("ToggleGroup/Level6Toggle/ToggleText").GetComponent <Text>();

            physicalTg_r.AddListener(OnClickPhysicalTg_R);
            magicTg_r.AddListener(OnClickMagicTg_R);
            critTg_r.AddListener(OnClickCritTg_R);
            atkSpeedTg_r.AddListener(OnClickAtkSpeedTg_R);
            moveSpeedTg_r.AddListener(OnClickMoveSpeedTg_R);
            lv1Tg_r.AddListener(OnClickLV1Tg_R);
            lv2Tg_r.AddListener(OnClickLV2Tg_R);
            lv3Tg_r.AddListener(OnClickLV3Tg_R);
            lv4Tg_r.AddListener(OnClickLV4Tg_R);
            lv5Tg_r.AddListener(OnClickLV5Tg_R);
            lv6Tg_r.AddListener(OnClickLV6Tg_R);
            #endregion

            #region Debris UI
            debrisTran      = transform.Find("DebrisUI");
            dragDebrisPanel = debrisTran.Find("DragDebrisPanel").GetComponent <ScrollRect>();
            debrisGroup     = debrisTran.Find("DragDebrisPanel/DebrisItemGroup").GetComponent <GridLayoutGroup>();
            debrisSkinIcon  = debrisTran.Find("DebrisSkinIcon").GetComponent <Image>();
            debrisUnitIcon  = debrisTran.Find("DebrisUnitIcon").GetComponent <Image>();
            debrisRuneIcon  = debrisTran.Find("DebrisRuneIcon").GetComponent <Image>();
            debrisRuneIcon.gameObject.SetActive(false);
            debrisSkinIcon.gameObject.SetActive(false);
            Transform tgDTran = debrisTran.Find("ToggleGroup");
            unitTg_d     = tgDTran.Find("UnitToggle").GetComponent <Toggle>();
            skinTg_d     = tgDTran.Find("SkinToggle").GetComponent <Toggle>();
            runeTg_d     = tgDTran.Find("RuneToggle").GetComponent <Toggle>();
            unitTgText_d = tgDTran.Find("UnitToggle/TypeText").GetComponent <Text>();
            skinTgText_d = tgDTran.Find("SkinToggle/TypeText").GetComponent <Text>();
            runeTgText_d = tgDTran.Find("RuneToggle/TypeText").GetComponent <Text>();
            debrisText_d = debrisTran.Find("DebrisText").GetComponent <Text>();

            if (dragDebrisPanel.GetComponent <DebrisItemScrollView>() == null)
            {
                debrisItemScrollView = dragDebrisPanel.gameObject.AddComponent <DebrisItemScrollView>();
            }
            else
            {
                debrisItemScrollView = dragDebrisPanel.GetComponent <DebrisItemScrollView>();
            }
            debrisItemScrollView.onCreateItemHandler = OnCreateDebrisItem;

            unitTg_d.AddListener(OnClickUnitTg_D);
            skinTg_d.AddListener(OnClickSkinTg_D);
            runeTg_d.AddListener(OnClickRuneTg_D);
            #endregion

            currentUI = recommendTran.gameObject;

            InitDebrisItem();
        }