예제 #1
0
        public void Clear()
        {
            for (int i = 0; i < matchRankItemList.Count; i++)
            {
                matchRankItemList[i].Clear();
            }
            matchRankItemList.Clear();
            matchRankItemList = null;

            for (int i = 0; i < matchRankItemObjList.Count; i++)
            {
                GameObject.DestroyImmediate(matchRankItemObjList[i]);
            }
            matchRankItemObjList.Clear();
            matchRankItemObjList = null;

            if (horseList != null)
            {
                horseList.Clear();
            }
            horseList    = null;
            funcs        = null;
            uiData       = null;
            battleModule = null;
        }
예제 #2
0
 public void Clear()
 {
     uiData = null;
     uIMatchSelfSkillLogic = null;
     myRunData             = null;
     battleModule          = null;
 }
예제 #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);
            }
        }
예제 #4
0
        public void Clear()
        {
            for (int i = 0; i < removeSkillIdList.Count; i++)
            {
                RemoveSkill(removeSkillIdList[i]);
            }
            removeSkillIdList.Clear();
            removeSkillIdList = null;

            foreach (GameObject selfSkill in DicSelfHorseSkillObj.Values)
            {
                if (selfSkill != null)
                {
                    //GameObject.DestroyImmediate(selfSkill);
                    PoolingSystem.Instance.ReturnClone(selfSkill);
                }
            }



            if (DicSelfHorseSkillObj != null)
            {
                DicSelfHorseSkillObj.Clear();
            }
            DicSelfHorseSkillObj = null;

            if (DicSelfHorseSkill != null)
            {
                DicSelfHorseSkill.Clear();
            }
            DicSelfHorseSkill = null;

            foreach (UIMatchSelfSkillComponent selfSkill in DicSelfHorseSkillComponent.Values)
            {
                if (selfSkill != null)
                {
                    selfSkill.Clear();
                }
            }

            if (DicSelfHorseSkillComponent != null)
            {
                DicSelfHorseSkillComponent.Clear();
            }
            DicSelfHorseSkillComponent = null;

            if (skillIdList != null)
            {
                skillIdList.Clear();
            }
            skillIdList = null;

            tweenerTwo = null;
            PoolingSystem.Instance.FreePrefabPooling(uiData.go_BuffTemplate);
            goInstanceID_to_manageComponent.Clear();
            uiData = null;
        }
예제 #5
0
        public void Init(UIBattleMainData data)
        {
            battleModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            uiData       = data;

            funcs     = battleModule.matchInit.funcs;
            horseList = funcs.GetHorses();
            uiData.button_MatchListOpen.onClick.AddListener(OnClickMatchListOpen);
        }
예제 #6
0
        private Color whiteColor = Color.white;                       //ffffffff

        public void Init(UIBattleMainData data)
        {
            battleModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            uiData       = data;
            gameRunRealCameraComponent = Game.Scene.GetComponent <GameRunRealCameraComponent>();

            myPlayerUID = battleModule.playerUID;
            horseList   = battleModule.matchInit.funcs.GetHorses();
        }
예제 #7
0
        //private Vector3 vSkillInfoRootInitPos = new Vector3();
        //private Vector3 vSkillInfoRootMovePos = new Vector3();
        //private Tweener tweener;

        public void Init(UIBattleMainData data)
        {
            battleModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            uiData       = data;

            //vSkillInfoRootInitPos = uiData.go_m_SkillInfoRoot.transform.localPosition;
            //float endMoveY = 16 + uiData.go_m_SkillInfoRoot.GetComponent<RectTransform>().sizeDelta.y;
            //vSkillInfoRootMovePos = vSkillInfoRootInitPos - new Vector3(0, endMoveY, 0);
            //uiData.text_SpeedValue_43.enabled = false;
            //uiData.button_ChatOpenBtn.onClick.AddListener(OnClickChatOpen);
        }
예제 #8
0
 public void Init(List <ModelHorseView> allHorseView, UIBattleMainData uiMatchData, ETModel.Match.Match matchInfo)
 {
     this.allHorseView = allHorseView;
     this.uiMatchData  = uiMatchData;
     this.matchInfo    = matchInfo;
     queueTween.Clear();
     MoveUpTweens.Clear();
     allFade = uiMatchData.trans_m_AdmissionInfo.GetComponent <DOTweenAnimation>();
     InitAdmissionPos();
     InitFirstShowUI();
     SetBattleInfo();
 }
예제 #9
0
 public void Clear()
 {
     if (timeCountDown != null)
     {
         timeCountDown.Dispose();
     }
     timeCountDown = null;
     uiData        = null;
     myRunData     = null;
     funcs         = null;
     matchModule   = null;
     battleModule  = null;
 }
예제 #10
0
        public void Init(UIBattleMainData data)
        {
            matchModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            funcs       = matchModule.matchInit.funcs;
            myRunData   = matchModule.myRunData;
            uiData      = data;

            horseList      = funcs.GetHorses();
            preEnsureValue = 0;
            uiData.slider_SliderEnsure.value = 1f;
            diWidth  = uiData.recttrans_DyRank.rect.width;
            diHeight = uiData.recttrans_DyRank.rect.height;
            ShowDyRankList();
        }
예제 #11
0
        private int maxMultiple = 1;  //快进最大倍数

        public void Init(UIBattleMainData data)
        {
            matchModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            uiData      = data;

            funcs = matchModule.matchInit.funcs;

            maxMultiple             = ModelComTools.Config.GetBaseByID(99005128).param1; //快进最大倍数
            uiData.text_AddNum.text = "X1";
            uiData.button_RecoveryBtn.gameObject.SetActive(false);
            uiData.button_PauseBtn.gameObject.SetActive(true);

            uiData.button_RecoveryBtn.onClick.AddListener(OnClickRecoveryBtn);
            uiData.button_PauseBtn.onClick.AddListener(OnClickPauseBtn);
            uiData.button_FastForward.onClick.AddListener(OnClickFastForward);
            uiData.button_CloseBtn.onClick.AddListener(OnClickCloseBtn);
        }
예제 #12
0
        public void ShowCloseUpUI(ETModel.Match.HorseRunData selectedHorseData, UIBattleMainData uiMatchData)
        {
            GameObjectTool.TextOverFlowLimitWidth(uiMatchData.text_TextHorseName, selectedHorseData.horseName);
            //名马
            if (selectedHorseData.horseName.Contains("famousHorse__"))
            {
                GameObjectTool.TextOverFlowLimitWidth(uiMatchData.text_TextHorseName, selectedHorseData.horseName.Substring(13));
            }
            uiMatchData.text_TextPlayerName.text = selectedHorseData.playerNickname;
            uiMatchData.text_TextPower.text      = selectedHorseData.fightValue + "";
            uiMatchData.text_TextRoad.text       = string.Format("Track {0}", selectedHorseData.PathId + 1);

            var ancestryType = (GameObjectTool.AncestryType)ModelComTools.Config.GetAncestryByID(selectedHorseData.horseModleId).Type;

            GameObjectTool.LoadHorseIconByHorseClothes(uiMatchData.image_Horse.transform, selectedHorseData.clothesModel, ancestryType);
            uiMatchData.go_m_CloseUpInfo.SetActive(true);
        }
예제 #13
0
        //private void OnClickChatOpen()
        //{
        //    if (tweener != null && tweener.IsPlaying())
        //        return;

        //    bool isInitPos = (uiData.go_m_SkillInfoRoot.transform.localPosition.y == vSkillInfoRootInitPos.y);
        //    float fMoveTagY = isInitPos ? vSkillInfoRootMovePos.y : vSkillInfoRootInitPos.y;
        //    float fRotationTagZ = isInitPos ? 180 : 0;
        //    tweener = uiData.go_m_SkillInfoRoot.transform.DOLocalMoveY(fMoveTagY, 0.5f);
        //    tweener.OnComplete(() =>
        //    {
        //        uiData.image_ChatJianTou.transform.localRotation = new Quaternion(0, 0, fRotationTagZ, 0);
        //    });
        //}
        public void Clear()
        {
            foreach (var item in chatItemList.Values)
            {
                item.Clear();
            }
            chatItemList.Clear();
            chatItemList = null;

            if (chatList != null)
            {
                chatList.Clear();
            }
            chatList = null;

            //tweener = null;
            uiData       = null;
            battleModule = null;
        }
예제 #14
0
        public void Clear()
        {
            for (int i = 0; i < matchRankItemList.Count; i++)
            {
                matchRankItemList[i].Clear();
            }
            matchRankItemList.Clear();
            matchRankItemList = null;

            for (int i = 0; i < matchRankItemObjList.Count; i++)
            {
                GameObject.DestroyImmediate(matchRankItemObjList[i]);
            }
            matchRankItemObjList.Clear();
            matchRankItemObjList = null;

            funcs       = null;
            uiData      = null;
            myRunData   = null;
            matchModule = null;
        }
예제 #15
0
        public void Init(UIBattleMainData data)
        {
            uiData = data;

            InitSkillBuffEffect();

            List <GameObject> tempPool = new List <GameObject>();

            for (int i = 0; i < 4; i++)
            {
                UIMatchSelfSkillComponent selfSkillComponent = new UIMatchSelfSkillComponent();
                GameObject clone = PoolingSystem.Instance.GetOneClone_NotActive(uiData.go_BuffTemplate);
                tempPool.Add(clone);
                selfSkillComponent.Init(clone.transform, this, uiData);
                goInstanceID_to_manageComponent.Add(clone.GetInstanceID(), selfSkillComponent);
            }
            foreach (GameObject clone in tempPool)
            {
                PoolingSystem.Instance.ReturnClone(clone);
            }
        }
예제 #16
0
        public void Init(UIBattleMainData data)
        {
            matchModule  = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            battleModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            funcs        = matchModule.matchInit.funcs;
            myRunData    = matchModule.myRunData;
            uiData       = data;

            timeCountDown = ComponentFactory.Create <TimeCountDownComponent>();
            endPos        = funcs.GetEnd();
            SetMyPosTo2D();

            if (battleModule.IsPlayback)
            {
                uiData.recttrans_m_GroundState.localPosition -= new Vector3(52, 0, 0);
            }
            //preEnsureValue = 0;
            //preSpeedValue = 0;

            //uiData.slider_m_SpeedProgress.value = 1f;
            //uiData.slider_SliderEnsure.value = 1f;
            uiData.toggle_ToggleName.onValueChanged.AddListener(OnToggleSwitchHeadClick);
        }
예제 #17
0
        public void Clear()
        {
            if (horseHeadList != null)
            {
                horseHeadList.Clear();
            }
            horseHeadList = null;

            for (int i = 0; i < horseHeadObjList.Count; i++)
            {
                GameObject.DestroyImmediate(horseHeadObjList[i]);
            }
            horseHeadObjList.Clear();
            horseHeadObjList = null;

            if (horseList != null)
            {
                horseList.Clear();
            }
            horseList = null;
            gameRunRealCameraComponent = null;
            uiData       = null;
            battleModule = null;
        }
예제 #18
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();
        }
예제 #19
0
 public void Clear()
 {
     funcs       = null;
     uiData      = null;
     matchModule = null;
 }