Ejemplo n.º 1
0
 public void Clear()
 {
     uiData = null;
     uIMatchSelfSkillLogic = null;
     myRunData             = null;
     battleModule          = null;
 }
Ejemplo n.º 2
0
 public void Release()
 {
     LongPressRelease();
     myRunData    = null;
     battleModule = null;
     uIMatchSelfSkillLogic.RemoveSelfSkill(skillId);
     uIMatchSelfSkillLogic = null;
 }
Ejemplo n.º 3
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);
            }
        }
Ejemplo n.º 4
0
        public void Init(Transform transRoot, UIMatchSelfSkillLogic uiParent, UIBattleMainData data)
        {
            battleModule          = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            myRunData             = battleModule.myRunData;
            endPos                = battleModule.matchInit.funcs.GetEnd();
            uIMatchSelfSkillLogic = uiParent;
            uiData                = data;

            isInited       = false;
            transform      = transRoot;
            image_SkillBtn = transform.GetComponent <ButtonLongPress>();
            if (image_SkillBtn == null)
            {
                image_SkillBtn = transform.gameObject.AddComponent <ButtonLongPress>();
            }
            image_Background  = transform.Find("Background").GetComponent <Image>();
            image_Fill        = transform.Find("Fill").GetComponent <Image>();
            image_SkillIcon   = transform.Find("SkillIcon").GetComponent <Image>();
            image_SkillIconZZ = transform.Find("SkillIconZZ").GetComponent <Image>();
            text_SkillCD      = transform.Find("SkillCD").GetComponent <Text>();
            currTime          = 0f;

            AddEvent();
        }