Exemple #1
0
        //显示对抗赛轮次
        public async ETTask ShowCombatInfo()
        {
            uiData.go_CombatVSNode.SetActive(false);
            uiData.go_CombatNode.SetActive(true);


            var tips = GameObjectTool.GetLanguage(50000008);

            uiData.text_CombatTitle.text = string.Format(tips, battleModule.matchInfo.roundIndex);
            for (int i = 0; i < battleModule.matchInfo.players.Count; i++)
            {
                MatchPlayer matchPlayer = battleModule.matchInfo.players[i];
                if (matchPlayer.playerUid == battleModule.playerUID)
                {
                    var ancestryType = (GameObjectTool.AncestryType)ModelComTools.Config.GetAncestryByID(matchPlayer.horse.modelId).Type;
                    GameObjectTool.LoadHorseIconByHorseClothes(uiData.tf_CombatLeftHead, matchPlayer.horse.clothesModel, ancestryType);
                    uiData.tf_CombatLeftName.text = matchPlayer.horse.name;
                    //uiData.image_CombatLeftHeadImg.sprite = GameObjectTool.LoadHorseIcon(matchPlayer.horse.skin);
                }
                else
                {
                    var ancestryType = (GameObjectTool.AncestryType)ModelComTools.Config.GetAncestryByID(matchPlayer.horse.modelId).Type;
                    GameObjectTool.LoadHorseIconByHorseClothes(uiData.tf_CombatRightHead, matchPlayer.horse.clothesModel, ancestryType);
                    uiData.tf_CombatRightName.text = matchPlayer.horse.name;
                    //uiData.image_CombatRightHeadImg.sprite = GameObjectTool.LoadHorseIcon(matchPlayer.horse.skin);
                }
            }

            await ModelComTools.TimerComponent.WaitAsync(250);

            uiData.go_CombatVSNode.SetActive(true);
            await ModelComTools.TimerComponent.WaitAsync(1500);

            uiData.go_CombatNode.SetActive(false);
        }
Exemple #2
0
        private void InitSkillInfo()
        {
            chatList.Clear();
            //初始几条信息
            var tips  = GameObjectTool.GetLanguage(50139195);
            var tips1 = GameObjectTool.GetLanguage(50139196);
            var tips2 = GameObjectTool.GetLanguage(50139197);
            var tips3 = GameObjectTool.GetLanguage(50139198);
            var tips4 = GameObjectTool.GetLanguage(50139199);

            chatList.Add(tips);
            chatList.Add(tips1);
            chatList.Add(tips2);
            if (battleModule.UsingFrameSync)
            {
                chatList.Add(tips3);
            }
            else
            {
                chatList.Add(tips4);
            }
            uiData.loopverticalscrollrect_SkillInfoList.ClearCells();
            uiData.loopverticalscrollrect_SkillInfoList.getObjectAction = OnCreateSkillInfoListItem;
            uiData.loopverticalscrollrect_SkillInfoList.totalCount      = chatList.Count;
            uiData.loopverticalscrollrect_SkillInfoList.RefillCells();
        }
Exemple #3
0
        private void SetSkillBuffInfo()
        {
            if (skillIndex >= skillIdList.Count)
            {
                return;
            }

            image_Fill.fillAmount        = 1;
            image_SkillIconZZ.fillAmount = 0;
            text_SkillCD.gameObject.SetActive(false);

            //设置技能图片
            var horseSkillDefine = ModelComTools.Config.GetHorseSkillByID(skillIdList[skillIndex]);

            if (horseSkillDefine != null)                                                   //马匹技能
            {
                text_SkillName.text    = GameObjectTool.GetLanguage(horseSkillDefine.Name); //ModelComTools.Config.GetLanguageByID(horseSkillDefine.Name).Chinese;
                image_SkillIcon.sprite = GameObjectTool.LoadSprite(horseSkillDefine.Image);
            }
            else//骑手技能
            {
                text_SkillCD.gameObject.SetActive(false);
                var humanSkillDefine = ModelComTools.Config.GetHumanSkillByID(skillIdList[skillIndex]);
                if (humanSkillDefine != null)
                {
                    text_SkillName.text    = GameObjectTool.GetLanguage(humanSkillDefine.Name);//ModelComTools.Config.GetLanguageByID(humanSkillDefine.Name).Chinese;
                    image_SkillIcon.sprite = GameObjectTool.LoadSprite(humanSkillDefine.Image);
                }
            }
        }
Exemple #4
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);
            }
        }
Exemple #5
0
        private void LongPress()
        {
            var currencyDefine = ModelComTools.Config.GetHorseSkillByID(skillId);

            if (currencyDefine != null)
            {
                //string showName = GameObjectTool.GetLanguage(currencyDefine.Name);
                string showDescribe = GameObjectTool.GetLanguage(currencyDefine.Describe);
                uiData.text_ExplainTxt.text = showDescribe;
                AlignScreen();
                uiData.go_ExplainNode.SetActive(true);
            }
        }
Exemple #6
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);
            }
        }
Exemple #7
0
        public void Run(int horseId, int skillId, bool isRemove)
        {
            //GameRunMatchComponent gameRunMatchComponent = Game.Scene.GetComponent<GameRunMatchComponent>();
            //if (gameRunMatchComponent == null || gameRunMatchComponent.IsDisposed)
            //    return;

            MatchModule    matchModule   = UtilsModuleManager.GetModule(ModuleType.MatchModule) as MatchModule;
            ModelHorseView findHorseView = matchModule.ModelHorseViewSet.Find(x => x.data.Id == horseId);

            //HorseView findHorseView = gameRunMatchComponent.GetHorseView(horseId);
            if (findHorseView == null)
            {
                Log.Error("没有这个马匹:" + horseId);
                return;
            }
            HorseSkillDefine horseSkillDefine = ModelComTools.Config.GetHorseSkillByID(skillId);

            if (horseSkillDefine == null)
            {
                Log.Error("没有这个技能:" + skillId);
                return;
            }
            List <int> skills = new List <int> {
                50080040, 50080041, 50080042, 50080043, 50080044, 50080045, 50080046, 50080047, 50080048, 50080049, 50080050, 50080051, 50080052, 50080053, 50080054, 50080055, 50080056, 50080057, 50080058, 50080059, 50080060, 50080061, 50080062, 50080063, 50080064, 50080065, 50080066, 50080067, 50080068, 50080069, 50080070
            };

            if (skills.Contains(horseSkillDefine.Name))
            {
                return;
            }
            string skillName = GameObjectTool.GetLanguage(horseSkillDefine.Name);
            string skillDesc = GameObjectTool.GetLanguage(horseSkillDefine.Describe);
            UIBattleMainComponent uiComponent = matchModule.uIBattleMainComponent;

            if (uiComponent != null)
            {
                var    tips      = GameObjectTool.GetLanguage(50138126);        //触发
                var    tips1     = GameObjectTool.GetLanguage(50138127);        //结束
                string skillInfo = string.Format(tips, horseId + 1, skillName); // $"<color=#24f50a>{horseId + 1}号赛马</color>:触发{skillName}技能";//,{skillDesc}";
                if (isRemove)
                {
                    skillInfo = string.Format(tips1, horseId + 1, skillName);//$"<color=#24f50a>{horseId + 1}号赛马</color>:技能{skillName}结束";
                }
                else
                {
                    if (horseSkillDefine.ExistTime > 0)
                    {
                        TimeCountDownComponent TimeCountDownComponentSkill = ComponentFactory.Create <TimeCountDownComponent>();
                        TimeCountDownComponentSkill.Init(horseSkillDefine.ExistTime, null, string.Empty, () =>
                        {
                            skillInfo = string.Format(tips1, horseId + 1, skillName);//$"<color=#24f50a>{horseId + 1}号赛马</color>:技能{skillName}结束";
                            uiComponent.AddSkillInfo(skillInfo);
                            TimeCountDownComponentSkill.Dispose();
                        });
                    }
                }
                uiComponent.AddSkillInfo(skillInfo);

                if (findHorseView.data.playerUid == matchModule.playerUID)
                {
                    uiComponent.SetSelfSkill(skillName, isRemove, skillId, horseSkillDefine.ExistTime);
                }
            }
        }