Exemplo n.º 1
0
 public void Clear()
 {
     uiData = null;
     uIMatchSelfSkillLogic = null;
     myRunData             = null;
     battleModule          = null;
 }
Exemplo n.º 2
0
        private void SetAdmissItemUIInfo(int i, GameObject instanceAdmissionUI)
        {
            Text text_TextHorseNumber = instanceAdmissionUI.transform.Find("TextHorseNumber").GetComponent <Text>();
            Text text_TextHorseName   = instanceAdmissionUI.transform.Find("TextHorseName").GetComponent <Text>();
            Text text_TextHorsePower  = instanceAdmissionUI.transform.Find("TextHorsePower").GetComponent <Text>();

            text_TextHorseNumber.text = string.Format("{0}", (allHorseView[i].data.Id + 1) + "");
            text_TextHorseName.text   = allHorseView[i].data.horseName;
            Image image_ItemMatchBg = instanceAdmissionUI.transform.Find("SaiMaJianJieDiTu").GetComponent <Image>();

            //GameObjectTool.TextOverFlowLimitWidth(text_TextHorseName, allHorseView[i].data.horseName);
            //if (allHorseView[i].data.horseName.Contains("famousHorse__"))
            //{
            //    GameObjectTool.TextOverFlowLimitWidth(text_TextHorseName, allHorseView[i].data.horseName.Substring(13));
            //}
            text_TextHorsePower.text = allHorseView[i].data.fightValue + "";

            MatchModule matchModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;

            if (matchModule.isSelfPlayer(allHorseView[i].data.playerUid))
            {
                image_ItemMatchBg.sprite = GameObjectTool.LoadSprite("templateBg1");
                //text_TextHorseNumber.text = $"<color=#ffb400>{text_TextHorseNumber.text}</color>";
                //text_TextHorseName.text= $"<color=#ffb400>{text_TextHorseName.text}</color>";
            }
        }
Exemplo n.º 3
0
        public void Init(Transform transRoot)
        {
            battleModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            myRunData    = battleModule.myRunData;
            Log.Info("myRunData " + (myRunData == null));

            CDTime                = ModelComTools.Config.GetBaseByID(99005125).param1 / 1000f;
            transform             = transRoot;
            image_DirCountDown    = transform.Find("DirObj/DirCountDown").GetComponent <Image>();
            button_ButtonDirBtn0  = transform.Find("DirObj/DirBtn0").GetComponent <Button>();
            button_ButtonDirBtn1  = transform.Find("DirObj/DirBtn1").GetComponent <Button>();
            button_ButtonDirBtn2  = transform.Find("DirObj/DirBtn2").GetComponent <Button>();
            button_ButtonDirBtn3  = transform.Find("DirObj/DirBtn3").GetComponent <Button>();
            go_OpObj              = transform.Find("m_DirKeyGroup/m_DirList/OpObj").gameObject;
            go_DirBtnItemTemplate = transform.Find("m_DirKeyGroup/DirBtnItemTemplate").gameObject;
            go_SaoGuangEft        = transform.Find("m_DirKeyGroup/SaoGuangEft").gameObject;
            go_SaoGuangEft.SetActive(false);

            button_ButtonDirBtn0.onClick.AddListener(delegate() { OnButtonDirBtnClick("0"); });
            button_ButtonDirBtn1.onClick.AddListener(delegate() { OnButtonDirBtnClick("1"); });
            button_ButtonDirBtn2.onClick.AddListener(delegate() { OnButtonDirBtnClick("2"); });
            button_ButtonDirBtn3.onClick.AddListener(delegate() { OnButtonDirBtnClick("3"); });

            InitSkillId();
            InitDirList();
            transform.gameObject.SetActive(false);
        }
Exemplo n.º 4
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;
        }
Exemplo n.º 5
0
        //pvp采取记录冲线前的数据点
        private void StartLoadInfo()
        {
            //记录开启后的位置点
            MatchModule matchModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;

            if (matchModule != null)
            {
                int _horseCount = matchModule.ModelHorseViewSet.Count;
                if (_horseCount > 0)
                {
                    for (int index = 0; index < _horseCount; index++)
                    {
                        Match.ModelHorseView _singleHorseView = matchModule.ModelHorseViewSet[index];
                        if (_singleHorseView != null)
                        {
                            List <HorseCrossLineStatus> _list  = new List <HorseCrossLineStatus>();
                            Vector3              _tempPosition = _singleHorseView.obj.position;
                            Quaternion           _tempRotation = _singleHorseView.obj.rotation;
                            HorseCrossLineStatus _curStatus    = new HorseCrossLineStatus(_tempPosition, _tempRotation);
                            _list.Add(_curStatus);
                            m_raceHorseDic[_singleHorseView] = _list;
                        }
                    }
                }
            }

            //打开update开始每隔几帧记录所有马匹的信息
            _bIsSaveHorsesData = true;
        }
Exemplo n.º 6
0
 public void Clear()
 {
     horse            = null;
     uIMatchRankLogic = null;
     matchItemData    = null;
     battleModule     = null;
 }
Exemplo n.º 7
0
 public void Release()
 {
     LongPressRelease();
     myRunData    = null;
     battleModule = null;
     uIMatchSelfSkillLogic.RemoveSelfSkill(skillId);
     uIMatchSelfSkillLogic = null;
 }
Exemplo n.º 8
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);
            }
        }
Exemplo n.º 9
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();
        }
Exemplo n.º 10
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);
        }
Exemplo n.º 11
0
        public void Run(SkillTriggerContent isRivals, int state)
        {
            MatchModule           matchModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            UIBattleMainComponent uiComponent = matchModule.uIBattleMainComponent;

            if (uiComponent != null)
            {
                uiComponent.ChangeSkillState(isRivals, state);
            }
        }
Exemplo n.º 12
0
        public void Run(bool isEnterCurse)
        {
            MatchModule           matchModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            UIBattleMainComponent uiComponent = matchModule.uIBattleMainComponent;

            if (uiComponent != null)
            {
                uiComponent.UpdateOpDirInfo(isEnterCurse);
            }
        }
Exemplo n.º 13
0
        //暂停
        public static void OnPauseGame()
        {
            MatchModule matchModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;

            if (matchModule != null)
            {
                matchModule.matchInit.allowUpdate = false;
            }
            Time.timeScale = 0;
        }
Exemplo n.º 14
0
        //恢复
        public static void OnRecoveryGame()
        {
            MatchModule matchModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;

            if (matchModule != null)
            {
                matchModule.matchInit.allowUpdate = true;
            }
            Time.timeScale = 1;
        }
Exemplo n.º 15
0
        public override void Run(string args)
        {
            MatchModule           matchModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            UIBattleMainComponent uiComponent = matchModule.uIBattleMainComponent;

            if (uiComponent != null)
            {
                uiComponent.PassEnd();
            }
        }
Exemplo n.º 16
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);
        }
Exemplo n.º 17
0
        private System.Random randomBySeed;     //随机数

        public void Init(Transform transParent) //只初始化一次UI数据
        {
            battleModule   = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            trans          = transParent;
            recttrans      = trans.gameObject.GetComponent <RectTransform>();
            funcs          = battleModule.matchInit.funcs;
            endPos         = funcs.GetEnd();
            randomBySeed   = funcs.GetRandomBySeed();
            go_RankIconMy  = transParent.Find("RankIconMy").gameObject;
            image_RankIcon = transParent.Find("RankIcon").GetComponent <Image>();
        }
Exemplo n.º 18
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);
        }
Exemplo n.º 19
0
        public void Run(int horseId)
        {
            MatchModule           matchModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            UIBattleMainComponent uiComponent = matchModule.uIBattleMainComponent;

            if (uiComponent != null)
            {
                var    tips      = GameObjectTool.GetLanguage(50138133);
                string skillInfo = string.Format(tips, horseId);//$"<color=#24f50a>{horseId}号赛马</color>:开始冲刺";
                uiComponent.AddSkillInfo(skillInfo);
            }
        }
Exemplo n.º 20
0
 public void Clear()
 {
     if (timeCountDown != null)
     {
         timeCountDown.Dispose();
     }
     timeCountDown = null;
     uiData        = null;
     myRunData     = null;
     funcs         = null;
     matchModule   = null;
     battleModule  = null;
 }
Exemplo n.º 21
0
 public override void Run(string parm)
 {
     if (int.TryParse(parm, out int cameraHorseID))
     {
         MatchModule                matchModule   = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
         ModelHorseView             findHorseView = matchModule.ModelHorseViewSet.Find(x => x.data.Id == cameraHorseID); //gameRunMatchComponent.GetHorseView(cameraHorseID);
         GameRunRealCameraComponent gameRunRealCameraComponent = Game.Scene.GetComponent <GameRunRealCameraComponent>();
         if (gameRunRealCameraComponent != null)
         {
             gameRunRealCameraComponent.currHorseView = findHorseView;
         }
     }
 }
Exemplo n.º 22
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();
        }
Exemplo n.º 23
0
 public void DoNewUpdate()
 {
     if (m_bIsStartLastPlayerFocus)
     {
         MatchModule matchModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
         if (matchModule != null && matchModule.matchInit != null && !matchModule.matchInit.isGameEnd)
         {
             int            _allPlayersCount = matchModule.matchInit.funcs.GetHorses().Count;
             int            _lastPlayerID    = matchModule.matchInit.funcs.GetCurrRanks()[_allPlayersCount - 1];
             ModelHorseView _lastHorseView   = matchModule.HorseRunDataID2ModelHorseViewSet[_lastPlayerID];
             Transform      _paramLast       = _lastHorseView.GetCloseUpCameraRelativeParam();
             FeatureCameraTrans.position = _paramLast.position;// + (FeatureCameraTrans.forward * -1) * 5 * tt / during;
             FeatureCameraTrans.rotation = _paramLast.rotation;
         }
     }
 }
Exemplo n.º 24
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);
        }
Exemplo n.º 25
0
        private void ReadyShowGameReward()
        {
            MatchModule matchModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;

            if (matchModule != null && matchModule.matchInfo != null)
            {
                //对抗赛的UI显示不同
                if (matchModule.matchInfo.type == 1401)
                {
                    Game.EventSystem.Run(EventIdType.ReadyShowCombatGameReward);
                }
                else
                {
                    Game.EventSystem.Run(EventIdType.ReadyShowGameReward);
                }
            }
        }
Exemplo n.º 26
0
        //jingchunlin 关闭子弹时间
        public void StopBulletTime()
        {
            MatchModule matchModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;

            if (matchModule != null && matchModule.matchInit != null && matchModule.matchInit.funcs != null)
            {
                bool _bIsUsingFrameSync = matchModule.matchInit.funcs.UsingFrameSync;
                if (!_bIsUsingFrameSync)//pve
                {
                    m_bIsPrepareStopGame = true;
                }
                else
                {
                    m_bIsPrepareStopPVPGame = true;
                }
            }
        }
Exemplo n.º 27
0
        public void Clear()
        {
            if (opDirList != null)
            {
                opDirList.Clear();
            }
            opDirList = null;

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

            myRunData    = null;
            battleModule = null;
        }
Exemplo n.º 28
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;
        }
Exemplo n.º 29
0
        //PVE:开启子弹时间的通知
        //PVP:开启记录路径信息的通知
        public void StartBulletTime()
        {
            MatchModule matchModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;

            if (matchModule != null && matchModule.matchInit != null && matchModule.matchInit.funcs != null)
            {
                bool _bIsUsingFrameSync = matchModule.matchInit.funcs.UsingFrameSync;
                //pve采取降低帧数,做到人物和时间都会同步降低
                if (!_bIsUsingFrameSync)
                {
                    Time.timeScale = 0.3f;
                }
                else
                {
                    //pvp采取记录冲线前的数据点
                    this.StartLoadInfo();
                }
            }
        }
Exemplo n.º 30
0
        public void Run(int horseId, bool IsBursting)
        {
            MatchModule           matchModule = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            UIBattleMainComponent uiComponent = matchModule.uIBattleMainComponent;

            if (uiComponent != null)
            {
                string skillInfo = "";
                var    start     = GameObjectTool.GetLanguage(50138133);
                var    stop      = GameObjectTool.GetLanguage(50139205);
                if (IsBursting)
                {
                    skillInfo = string.Format(start, horseId);// $"<color=#24f50a>{horseId}号赛马</color>:开始加速";
                }
                else
                {
                    skillInfo = string.Format(stop, horseId);//$"<color=#24f50a>{horseId}号赛马</color>:停止加速";
                }
                uiComponent.AddSkillInfo(skillInfo);
            }
        }