Exemple #1
0
 public void Clear()
 {
     horse            = null;
     uIMatchRankLogic = null;
     matchItemData    = null;
     battleModule     = null;
 }
Exemple #2
0
        public void Init(Transform transform)
        {
            battleModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;

            trans            = transform;
            uiData           = new UIBattleMainData();
            uiData.transform = trans;
            uiData.InitUI();
            uiData.button_Buttonok.onClick.RemoveAllListeners();
            uiData.button_Buttonok.onClick.AddListener(() => {
                uiData.go_m_yindao.SetActive(false);
                if (countDownBack != null)
                {
                    countDownBack();
                    countDownBack = null;
                }
            });
            uIMatchRankLogic = new UIMatchRankLogic();
            uIMatchRankLogic.Init(uiData);

            dirComponent = new UIMatchOpDirComponent();
            dirComponent.Init(uiData.go_m_FightButtonRoot.transform);

            opSkillComponent = new UIMatchOpSkillComponent();
            opSkillComponent.Init(uiData.go_m_FightSkillRoot.transform);

            uIMatchEnsureAndSpeedLogic = new UIMatchEnsureAndSpeedLogic();
            uIMatchEnsureAndSpeedLogic.Init(uiData);

            uIMatchCountDownLogic = new UIMatchCountDownLogic();
            uIMatchCountDownLogic.Init(uiData);

            uIMatchHorseHeadLogic = new UIMatchHorseHeadLogic();
            uIMatchHorseHeadLogic.Init(uiData);

            uIMatchSelfSkillLogic = new UIMatchSelfSkillLogic();
            uIMatchSelfSkillLogic.Init(uiData);

            uIMatchChatLogic = new UIMatchChatLogic();
            uIMatchChatLogic.Init(uiData);

            uIMatchPlayerBackComponent = new UIMatchPlayerBackComponent();
            uIMatchPlayerBackComponent.Init(uiData);

            isBeginCountTime = false;
            Game.EventSystem.RegistLocalLateUpdate(this, Game.Scene.GetComponent <GameRunRealCameraComponent>());

            GameTrackHPEffectComponent hpEffectComp = Game.Scene.GetComponent <GameTrackHPEffectComponent>();

            if (hpEffectComp == null || hpEffectComp.IsDisposed)
            {
                //do nothing
            }
            else
            {
                hpEffectComp.ApplyOutPutImage(uiData.RenderRealPathHPEffect);
            }
        }
Exemple #3
0
        //private Color redColor = Color.red;
        //private Color whiteColor = Color.white;
        //private Color customColor = new Color(0xa7, 0xff, 0x34);//<color=#a7ff34>

        public void Init(Transform transParent, UIMatchRankLogic uiParent)//只初始化一次UI数据
        {
            uIMatchRankLogic        = uiParent;
            battleModule            = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            matchItemData           = new MatchItemData();
            matchItemData.transform = transParent;
            matchItemData.InitUI();

            matchItemData.button_templateMatchItem.onClick.AddListener(OnItemClick);
        }