Esempio n. 1
0
 void OnGUI()
 {
     if (Application.isPlaying)
     {
         if (VirtualServerController.instance)
         {
             VirtualServerController.instance.fightEidtor = true;
         }
     }
     EditorGUILayout.BeginHorizontal();
     EditorGUILayout.LabelField("战斗目标获取检测工具");
     EditorGUILayout.EndHorizontal();
     EditorGUILayout.LabelField("选中当前方为我方,未选中当前方为敌方");
     isPlayer   = EditorGUILayout.Toggle("我方:", isPlayer, GUILayout.Width(500));
     positionId = EditorGUILayout.Popup("当前位置:", positionId, positionIds, GUILayout.Width(500));
     targetType = (TargetType)EditorGUILayout.Popup("目标类型", (int)targetType, targetArray, GUILayout.Width(500));
     //EditorGUILayout.LabelField("1.CurrentSingle:当前目标单体 2.CurrentRow:当前目标所在横行 3.CurrentColumn:当前目标所在的列");
     //EditorGUILayout.LabelField("4.All:全体 5.CurrentAndBehindFirst:当前所在目标以及后面1格(共2格)6.CurrentAndNearCross:当前目标以及相邻的十字型");
     //EditorGUILayout.LabelField("7.CurrentBehindFirst:当前目标后面第1格(共1格)8.CurrentBehindSecond:当前目标后面第2格(共1格)9.CurrentUpOrDown:当前目标横向间隔1格位置(上下2个点,最多打1人)");
     //EditorGUILayout.LabelField("10.CurrentAndRandomTwo:以当前目标为起点的随机闪电链,3人 11.RandomN:全体目标中随机N个 12.Cross:绝对位置,正中十字");
     //EditorGUILayout.LabelField("13.FirstColum:绝对位置,第一列 14.SecondColum:绝对位置,第二列 15.ThirdColum:绝对位置,第三列");
     //EditorGUILayout.LabelField("16.FirstRow:绝对位置,第一行 17.SecondRow:绝对位置,第二行 18.ThirdRow:绝对位置,第三行");
     //EditorGUILayout.LabelField("19.ExceptMidpoint:绝对位置,除中间1格的其它8格 20.Midpoint:绝对位置,正中间1格");
     //EditorGUILayout.LabelField("21.LeadingDiagonal:绝对位置,上对角线(主对角线) 22.SecondaryDiagonal:绝对位置,下对角线(次对角线)");
     rangeType = (RangeType)EditorGUILayout.Popup("范围类型", (int)rangeType, rangeTypes, GUILayout.Width(500));
     if (Application.isPlaying)
     {
         if (GUILayout.Button("查找", GUILayout.Width(500)))
         {
             if (Fight.Controller.FightController.instance.fightStatus != FightStatus.GameOver)
             {
                 if (targetType == TargetType.None || rangeType == RangeType.None)
                 {
                     return;
                 }
                 if (targets != null)
                 {
                     targets.Clear();
                 }
                 targets = null;
                 int pid = positionId + (isPlayer ? 1 : 101);
                 targets = VirtualServerController.instance.GetTargets((uint)pid, targetType, rangeType, isPlayer);
             }
         }
         EditorGUILayout.LabelField("当前方为:" + (isPlayer ? "我方" : "敌方"));
         EditorGUILayout.LabelField("目标为:" + targetType.ToString());
         EditorGUILayout.LabelField("范围为:" + rangeType.ToString());
         EditorGUILayout.Space();
         EditorGUILayout.LabelField("目标列表:");
         EditorGUILayout.Space();
         if (targets != null)
         {
             for (int i = 0, count = targets.Count; i < count; i++)
             {
                 CharacterEntity target1 = CharacterUtil.FindTarget(targetType, isPlayer, targets[i].Key);
                 CharacterEntity target2 = CharacterUtil.FindTarget(targetType, isPlayer, targets[i].Value);
                 if (target1 is PlayerEntity)
                 {
                     EditorGUILayout.LabelField("技能目标:主角:" + target1.name.Replace("(Clone)", string.Empty) + ",ID:" + target1.characterInfo.instanceID + ",位置为左边第" + target1.positionId + "位");
                 }
                 else if (target1 is HeroEntity)
                 {
                     EditorGUILayout.LabelField("技能目标:伙伴:" + target1.name.Replace("(Clone)", string.Empty) + ",ID:" + target1.characterInfo.instanceID + ",位置为左边第" + target1.positionId + "位");
                 }
                 else if (target1 is EnemyEntity)
                 {
                     EditorGUILayout.LabelField("技能目标:敌方:" + target1.name.Replace("(Clone)", string.Empty) + ",ID:" + target1.characterInfo.instanceID + ",位置为右边第" + (target1.positionId % 100) + "位");
                 }
                 else if (target1 is EnemyPlayerEntity)
                 {
                     EditorGUILayout.LabelField("技能目标:敌方:" + target1.name.Replace("(Clone)", string.Empty) + ",ID:" + target1.characterInfo.instanceID + ",位置为右边第" + (target1.positionId % 100) + "位");
                 }
                 if (target2 is PlayerEntity)
                 {
                     EditorGUILayout.LabelField("效果目标:主角:" + target2.name.Replace("(Clone)", string.Empty) + ",ID:" + target2.characterInfo.instanceID + ",位置为左边第" + target2.positionId + "位");
                 }
                 else if (target2 is HeroEntity)
                 {
                     EditorGUILayout.LabelField("效果目标:伙伴:" + target2.name.Replace("(Clone)", string.Empty) + ",ID:" + target2.characterInfo.instanceID + ",位置为左边第" + target2.positionId + "位");
                 }
                 else if (target2 is EnemyEntity)
                 {
                     EditorGUILayout.LabelField("效果目标:敌方:" + target2.name.Replace("(Clone)", string.Empty) + ",ID:" + target2.characterInfo.instanceID + ",位置为右边第" + (target2.positionId % 100) + "位");
                 }
                 else if (target2 is EnemyPlayerEntity)
                 {
                     EditorGUILayout.LabelField("效果目标:敌方:" + target2.name.Replace("(Clone)", string.Empty) + ",ID:" + target2.characterInfo.instanceID + ",位置为右边第" + (target2.positionId % 100) + "位");
                 }
                 EditorGUILayout.Space();
             }
         }
     }
     else
     {
         if (targets != null)
         {
             targets.Clear();
         }
     }
 }
Esempio n. 2
0
        public void FinishSkill(uint skillId, uint characterId, bool isPlayer)
        {
            //Debugger.LogError("finish skillID:" + skillId.ToString());
#if UNITY_EDITOR
            finishSkills.Add(skillId);
#endif
            if (aeonSkillingDic.ContainsKey(skillId))//超级技能
            {
                aeonSkillingDic.Remove(skillId);
                TickCD(true);
            }
            string key = StringUtil.ConcatNumber(characterId, skillId);
            beLcokedDic.TryDelete(key);
            skillWaitFinishDic.TryDelete(key);
            skillingDic.TryDelete(key);


            CharacterEntity character = null;
            //检测自己是否死亡
            if (isPlayer)
            {
                character = PlayerController.instance[characterId];
            }
            else
            {
                character = EnemyController.instance[characterId];
            }
            if (character && character.isDead)
            {
                VerifyDead(character, isPlayer);
            }

            bool needTick = true;
            if (aeonSkillingDic.Count > 0)
            {
                needTick = false;
            }
            else
            {
                string[] keys = skillingDic.GetKeyArray();
                for (int i = 0, count = keys.Length; i < count; i++)
                {
                    KeyValuePair <uint, uint> kvp = keys[i].SplitToKeyValuePair <uint, uint>();
                    SkillData skillData           = SkillData.GetSkillDataById(kvp.Value);
                    if (skillData.skillType == SkillType.Skill)
                    {
                        needTick &= false;
                    }
                }
            }
            if (needTick && !_hanguped)
            {
                TickCD(true);
            }
            switch (FightController.instance.fightType)
            {
            case FightType.PVE:
            case FightType.Arena:
            case FightType.DailyPVE:
            case FightType.Expedition:
            case FightType.WorldTree:
            case FightType.WorldBoss:
            case FightType.FirstFight:
            case FightType.SkillDisplay:
            case FightType.PVP:
            case FightType.FriendFight:
            case FightType.MineFight:
                break;

            case FightType.ConsortiaFight:
                List <int> deadHeroList = Fight.Model.FightProxy.instance.GetConsortiaDeadHeroList((int)characterId, (int)skillId);
                if (deadHeroList != null && deadHeroList.Count > 0)
                {
                    for (int i = 0, count = deadHeroList.Count; i < count; i++)
                    {
                        CharacterEntity c = CharacterUtil.FindTarget((uint)deadHeroList[i]);
                        if (c != null && !c.isDead)
                        {
                            DataMessageHandler.DataMessage_Dead(c.characterInfo.instanceID, c.isPlayer);
                        }
                    }
                }
                OrderConsortiaSkill();
                Fight.Model.FightProxy.instance.RemoveConsortiaFightData((int)characterId, (int)skillId);
                break;
            }
            //VirtualServerController.instance.PlaySkillCalc();
        }
Esempio n. 3
0
        private void PlayAOEEffects(float lastDelay, int layer)
        {
            #region aoe
            MechanicsData mechanicsData = null;
            List <float>  timelineKeys  = skillInfo.skillData.timeline.GetKeys();
            Dictionary <CharacterEntity, int> judgeTypeDic = new Dictionary <CharacterEntity, int>();
            for (int j = 0, count = timelineList.Count; j < count; j++)
            {
                Dictionary <uint, List <KeyValuePair <uint, uint> > > mechanicsDic = timelineList[j];
                List <uint> mechanicsKeys = mechanicsDic.GetKeys();
                List <Triple <float, float, float> > mechanicsValues = skillInfo.skillData.mechanicsValues[j];
                uint effectId = 0;
                if (skillInfo.skillData.aoeEffects.Length > j)
                {
                    effectId = skillInfo.skillData.aoeEffects[j];
                }
                for (int k = 0, kCount = mechanicsKeys.Count; k < kCount; k++)
                {
                    uint mechanicsId = mechanicsKeys[k];
                    mechanicsData = MechanicsData.GetMechanicsDataById(mechanicsId);
                    List <KeyValuePair <uint, uint> > tids;
                    if (mechanicsData.mechanicsType == MechanicsType.Reborn)
                    {
                        tids = CharacterUtil.FindDeadTargets(mechanicsData.rangeType, mechanicsData.targetType, isPlayer);
                        if (mechanicsData.rangeType == RangeType.All || mechanicsData.rangeType == RangeType.AllAbsolutely)
                        {
                            tids.AddRange(CharacterUtil.FindAllTargets(mechanicsData.targetType, isPlayer));
                        }
                    }
                    else
                    {
                        if (mechanicsData.rangeType == RangeType.All || mechanicsData.rangeType == RangeType.AllAbsolutely)
                        {
                            tids = CharacterUtil.FindAllTargets(mechanicsData.targetType, isPlayer);
                        }
                        else
                        {
                            tids = mechanicsDic[mechanicsId];
                        }
                    }
                    Triple <float, float, float> mechanicsValue = mechanicsValues[k];
                    float delay = timelineKeys[j] + lastDelay;
                    if (GameSetting.instance.effectable)
                    {
                        EffectInfo effectInfo = new EffectInfo(effectId);
                        if (effectInfo.effectData != null)
                        {
                            effectInfo.character      = character;
                            effectInfo.target         = character;
                            effectInfo.skillInfo      = skillInfo;
                            effectInfo.delay          = delay + effectInfo.effectData.delay;
                            effectInfo.mechanicsData  = mechanicsData;
                            effectInfo.mechanicsValue = mechanicsValue;

                            switch (effectInfo.effectData.effectType)
                            {
                            case EffectType.TargetArea:    //根据范围信息取位置
                                uint positionId = GetTargetAreaPositionId(mechanicsData, tids, isPlayer);
                                effectInfo.pos = PositionData.GetPos(positionId);
                                delay         += effectInfo.effectData.delay;
                                break;
                            }
                            EffectController.instance.PlayEffect(effectInfo, layer);
                        }
                    }
                    bool isLastTarget = false;
                    if (FightController.instance.fightStatus == FightStatus.Normal)//矫正因暂停导致时间线推迟
                    {
                        delay -= skillInfo.skillData.pauseTime;
                    }
                    for (int i = 0, iCount = tids.Count; i < iCount; i++)
                    {
                        if (i == iCount - 1)
                        {
                            isLastTarget = true;
                        }
                        CharacterEntity target1 = CharacterUtil.FindTarget(mechanicsData.mechanicsType, mechanicsData.targetType, isPlayer, tids[i].Key);
                        CharacterEntity target2 = CharacterUtil.FindTarget(mechanicsData.mechanicsType, mechanicsData.targetType, isPlayer, tids[i].Value);
                        if (!target1)
                        {
                            continue;
                        }
                        int judgeType = 0;
                        if (!judgeTypeDic.ContainsKey(target1))
                        {
                            judgeType             = JudgeUtil.GetJudgeResult(character, target1, target2, (int)skillInfo.skillData.skillId);
                            judgeTypeDic[target1] = judgeType;
                            if (judgeType == 0)
                            {
                                EffectController.instance.RemoveEffectByPrefabName(EffectController.SPEED_LINE);
                            }
                        }
                        else
                        {
                            judgeType = judgeTypeDic[target1];
                        }
                        if (isPlayer)
                        {
                            MechanicsController.instance.PlayerMechanics(skillInfo, mechanicsData, character, target1, target2, mechanicsValue, delay, judgeType, isLastTarget);
                        }
                        else
                        {
                            MechanicsController.instance.EnemyMechanics(skillInfo, mechanicsData, character, target1, target2, mechanicsValue, delay, judgeType, isLastTarget);
                        }
                    }
                }
            }
            judgeTypeDic.Clear();
            judgeTypeDic = null;
            #endregion
        }
Esempio n. 4
0
        private uint GetTargetAreaPositionId(MechanicsData mechanicsData, List <KeyValuePair <uint, uint> > tids, bool isPlayer)
        {
            uint positionId = 0;

            switch (mechanicsData.rangeType)
            {
            case RangeType.CurrentSingle:
            case RangeType.CurrentRow:
            case RangeType.CurrentColumn:
            case RangeType.All:
            case RangeType.CurrentAndBehindFirst:
            case RangeType.CurrentAndNearCross:
            case RangeType.CurrentBehindFirst:
            case RangeType.CurrentBehindSecond:
            case RangeType.CurrentIntervalOne:
            case RangeType.CurrentAndRandomTwo:
            case RangeType.Weakness:
            case RangeType.LowestHP:
            case RangeType.RandomSingle:
            case RangeType.CurrentAndBehindTowColum:
                CharacterEntity firstTarget = CharacterUtil.FindTarget(mechanicsData.mechanicsType, mechanicsData.targetType, isPlayer, tids.First().Key);
                positionId = firstTarget.positionId;
                break;

            case RangeType.RandomN:
            case RangeType.Cross:
            case RangeType.SecondColum:
            case RangeType.ExceptMidpoint:
            case RangeType.Midpoint:
            case RangeType.AllAbsolutely:
            case  RangeType.BehindTowColum:
                switch (mechanicsData.targetType)
                {
                case TargetType.Ally:
                    if (isPlayer)
                    {
                        positionId = (uint)FormationPosition.Player_Position_5;
                    }
                    else
                    {
                        positionId = (uint)FormationPosition.Enemy_Position_5;
                    }
                    break;

                case TargetType.Enemy:
                    if (isPlayer)
                    {
                        positionId = (uint)FormationPosition.Enemy_Position_5;
                    }
                    else
                    {
                        positionId = (uint)FormationPosition.Player_Position_5;
                    }
                    break;
                }
                break;

            case RangeType.FirstColum:
            case RangeType.SecondRow:
                switch (mechanicsData.targetType)
                {
                case TargetType.Ally:
                    if (isPlayer)
                    {
                        positionId = (uint)FormationPosition.Player_Position_2;
                    }
                    else
                    {
                        positionId = (uint)FormationPosition.Enemy_Position_2;
                    }
                    break;

                case TargetType.Enemy:
                    if (isPlayer)
                    {
                        positionId = (uint)FormationPosition.Enemy_Position_2;
                    }
                    else
                    {
                        positionId = (uint)FormationPosition.Player_Position_2;
                    }
                    break;
                }
                break;

            case RangeType.ThirdColum:
                switch (mechanicsData.targetType)
                {
                case TargetType.Ally:
                    if (isPlayer)
                    {
                        positionId = (uint)FormationPosition.Player_Position_7;
                    }
                    else
                    {
                        positionId = (uint)FormationPosition.Enemy_Position_7;
                    }
                    break;

                case TargetType.Enemy:
                    if (isPlayer)
                    {
                        positionId = (uint)FormationPosition.Enemy_Position_7;
                    }
                    else
                    {
                        positionId = (uint)FormationPosition.Player_Position_7;
                    }
                    break;
                }
                break;

            case RangeType.FirstRow:
            case RangeType.LeadingDiagonal:
                switch (mechanicsData.targetType)
                {
                case TargetType.Ally:
                    if (isPlayer)
                    {
                        positionId = (uint)FormationPosition.Player_Position_1;
                    }
                    else
                    {
                        positionId = (uint)FormationPosition.Enemy_Position_1;
                    }
                    break;

                case TargetType.Enemy:
                    if (isPlayer)
                    {
                        positionId = (uint)FormationPosition.Enemy_Position_1;
                    }
                    else
                    {
                        positionId = (uint)FormationPosition.Player_Position_1;
                    }
                    break;
                }
                break;

            case RangeType.ThirdRow:
            case RangeType.SecondaryDiagonal:
                switch (mechanicsData.targetType)
                {
                case TargetType.Ally:
                    if (isPlayer)
                    {
                        positionId = (uint)FormationPosition.Player_Position_3;
                    }
                    else
                    {
                        positionId = (uint)FormationPosition.Enemy_Position_3;
                    }
                    break;

                case TargetType.Enemy:
                    if (isPlayer)
                    {
                        positionId = (uint)FormationPosition.Enemy_Position_3;
                    }
                    else
                    {
                        positionId = (uint)FormationPosition.Player_Position_3;
                    }
                    break;
                }
                break;
            }
            return(positionId);
        }
Esempio n. 5
0
        public override void Execute()
        {
            if (skillInfo == null || timelineList == null)
            {
                return;
            }
            if (!character)
            {
                return;
            }
            if (character.status == Status.Dead)
            {
                return;
            }
            foreach (var kvp in character.characterInfo.passiveIdDic)
            {
                LuaInterface.LuaFunction func = PassiveSkillController.instance.GetPassiveSkillLuaFunction(PassiveSkillController.PLAY_SKILL, kvp.Key);
                if (func != null)
                {
                    func.Call(character, kvp.Value);
                }
            }
            int layer = (int)LayerType.Fight;

            if (FightController.instance.fightStatus == FightStatus.Normal)
            {
                if (skillInfo.skillData.pauseTime > 0)
                {
                    TimeScaler.instance.PauseTrigger(character, skillInfo.skillData.pauseTime / Game.GameSetting.instance.speed, GameScaleMode.Animator, Game.GameSetting.instance.speed, character.anim);
                }
            }
            if (skillInfo.skillData.showTime)
            {
                Logic.UI.SkillBanner.View.SkillBannerView skillBannerView = Logic.UI.SkillBanner.View.SkillBannerView.Open();
                skillBannerView.Show(skillInfo);
                if (isPlayer && FightController.instance.fightType != FightType.SkillDisplay)
                {
                    Logic.UI.SkillHead.View.SkillHeadView.SetRoleInfo(character.characterInfo.roleInfo, SkillHeadViewShowType.Left);
                }
            }

            MechanicsData mechanicsData = null;

            #region camera close up
            if (GameSetting.instance.closeupCameraable)
            {
                if (FightController.instance.fightStatus == FightStatus.Normal)
                {
                    if ((isPlayer || (!isPlayer && EnemyController.instance.isBoss(character.characterInfo.instanceID))) && skillInfo.animationData.closeup)
                    //if (isPlayer && skillInfo.animationData.closeup)
                    {
                        FightController.instance.isCloseup = true;
                        layer = (int)LayerType.Closeup;
                        EnemyController.instance.ShowHPBarViews(false);
                        PlayerController.instance.ShowHPBarViews(false);
                        if (Skill.SkillUtil.GetSkillMechanicsType(skillInfo) == MechanicsType.None)
                        {
                            Logic.UI.SkillBar.Controller.SkillBarController.instance.Show(false);
                        }
                        Judge.Controller.JudgeController.instance.ShowDamageBarViewPool(false);
                        Cameras.Controller.CameraController.instance.ShowMainCamera(false);
                        Transform parent = TransformUtil.Find(Logic.Cameras.Controller.CameraController.CAMERA_NODE, character.transform, true);
                        Cameras.Controller.CameraController.instance.ShowCloseupCamera(character, parent);
                        TransformUtil.SwitchLayer(character.transform, layer);
                        List <CharacterEntity> targets = CharacterUtil.SwitchCharacterLayer(skillInfo, timelineList, isPlayer, layer);
                        FightController.instance.SetCloseupCharacter(character, targets);
                    }
                }
            }
            #endregion
            #region camera

            /*
             #if UNITY_EDITOR
             * if (FightController.imitate || character.characterInfo.roleInfo.heroData.starMax >= 5)
             * {
             #else
             * if (character.characterInfo.roleInfo.heroData.starMax >= 5)
             * {
             #endif
             *  if (skillInfo.skillData.skillType == SkillType.Skill)
             *  {
             *      switch (skillInfo.animationData.animType)
             *      {
             *          case AnimType.Root:
             *              {
             *                  float backTime = skillInfo.skillData.timeline.First().Key - 0.3f;
             *                  if (backTime > 0.5f)
             *                  {
             *                      float delay = 0.3f;
             *                      CameraController.instance.CloseTarget(character, delay);
             *                      //int layerNone = (int)LayerType.None;
             *                      //SwitchCharactersLayer(layerNone, false);
             *                      //CameraController.instance.ResetMainCamera(backTime, () =>
             *                      //{
             *                      //    SwitchCharactersLayer((int)LayerType.Fight, true);
             *                      //});
             *                      CameraController.instance.ResetMainCamera(backTime, null);
             *                  }
             *              }
             *              break;
             *          case AnimType.Trace:
             *              {
             *                  float backTime = skillInfo.animationData.moveTime;
             *                  if (backTime > 0.5f)
             *                  {
             *                      float delay = 0.3f;
             *                      CameraController.instance.CloseTarget(character, delay);
             *                      //int layerNone = (int)LayerType.None;
             *                      //SwitchCharactersLayer(layerNone, false);
             *                      //CameraController.instance.ResetMainCamera(backTime, () =>
             *                      //{
             *                      //    SwitchCharactersLayer((int)LayerType.Fight, true);
             *                      //});
             *                      CameraController.instance.ResetMainCamera(backTime, null);
             *                  }
             *              }
             *              break;
             *          case AnimType.Run:
             *              break;
             *
             *      }
             *  }
             #if UNITY_EDITOR
             * }
             #else
             * }
             #endif
             * */
            if (FightController.instance.fightStatus == FightStatus.Normal && skillInfo.skillData.cameraLength > 0)
            {
                CameraController.instance.CloseTarget(character, skillInfo.skillData.cameraTime);
                CameraController.instance.ResetMainCamera(skillInfo.skillData.cameraTime + skillInfo.skillData.cameraLength);
            }

            #endregion
            if (skillInfo.animationData.animType != AnimType.Run)
            {
                AnimatorUtil.Play(character.anim, Animator.StringToHash(AnimatorUtil.BASE_LAYER + skillInfo.animationData.animName), 0, 0f);
            }
            switch (skillInfo.animationData.animType)
            {
            case AnimType.Root:
            case AnimType.Trace:
                PlayCasterEffect(layer);
                break;
            }

            #region 远程技能特效
            if (skillInfo.animationData.animType == AnimType.Root)
            {
                #region aoe
                //aoe 与 单体互斥
                if (skillInfo.skillData.aoeFlyEffects.Length > 0)
                {
                    #region aeo fly  只有表现,没有效果
                    List <float> timelineKeys = skillInfo.skillData.timeline.GetKeys();
                    for (int j = 0, count = timelineList.Count; j < count; j++)
                    {
                        Dictionary <uint, List <KeyValuePair <uint, uint> > > mechanicsDic = timelineList[j];
                        List <uint> mechanicsKeys = mechanicsDic.GetKeys();
                        uint        effectId      = 0;
                        if (skillInfo.skillData.aoeFlyEffects.Length > j)
                        {
                            effectId = skillInfo.skillData.aoeFlyEffects[j];
                        }
                        for (int k = 0, kCount = mechanicsKeys.Count; k < kCount; k++)
                        {
                            uint mechanicsId = mechanicsKeys[k];
                            mechanicsData = MechanicsData.GetMechanicsDataById(mechanicsId);
                            List <KeyValuePair <uint, uint> > tids;
                            if (mechanicsData.mechanicsType == MechanicsType.Reborn)
                            {
                                tids = CharacterUtil.FindDeadTargets(mechanicsData.rangeType, mechanicsData.targetType, isPlayer);
                                if (mechanicsData.rangeType == RangeType.All || mechanicsData.rangeType == RangeType.AllAbsolutely)
                                {
                                    tids.AddRange(CharacterUtil.FindAllTargets(mechanicsData.targetType, isPlayer));
                                }
                            }
                            else
                            {
                                if (mechanicsData.rangeType == RangeType.All || mechanicsData.rangeType == RangeType.AllAbsolutely)
                                {
                                    tids = CharacterUtil.FindAllTargets(mechanicsData.targetType, isPlayer);
                                }
                                else
                                {
                                    tids = mechanicsDic[mechanicsId];
                                }
                            }
                            float delay = 0f;
                            if (GameSetting.instance.effectable)
                            {
                                EffectInfo effectInfo = new EffectInfo(effectId);
                                if (effectInfo.effectData != null)
                                {
                                    effectInfo.character = character;
                                    effectInfo.target    = character;
                                    effectInfo.skillInfo = skillInfo;
                                    effectInfo.delay     = timelineKeys[j] + effectInfo.effectData.delay;
                                    switch (effectInfo.effectData.effectType)
                                    {
                                    case EffectType.Trace:
                                    case EffectType.CurveTrace:    //感觉跟直线轨迹是一样的
                                        uint         positionId   = GetTargetAreaPositionId(mechanicsData, tids, isPlayer);
                                        PositionData positionData = PositionData.GetPostionDataById(positionId);
                                        effectInfo.rotateAngles = skillInfo.rotateAngles;     //FightController.instance.Rotate(character.transform, positionData.position);
                                        Vector3 offset = effectInfo.effectData.offset;
                                        if (!isPlayer)
                                        {
                                            offset.x *= -1;
                                        }
                                        effectInfo.pos = PositionData.GetPostionDataById(character.positionId).position + offset;
                                        float positionRow = PositionData.GetEnemyPositionLevels(character.positionId, positionId);
                                        effectInfo.time = effectInfo.effectData.moveTime * (positionRow * GameConfig.timePercent + 1f);
                                        Vector3 endOffset = effectInfo.effectData.endOffset;
                                        if (!isPlayer)
                                        {
                                            endOffset.x *= -1;
                                        }
                                        effectInfo.endPos = positionData.position + endOffset;
                                        delay             = effectInfo.effectData.delay + effectInfo.time;
                                        EffectController.instance.PlayEffect(effectInfo, layer);
                                        break;
                                    }
                                }
                            }
                            PlayAOEEffects(delay, layer);//aoe飞行特效只计算特效延迟和飞行时间,不加时间点,aoe特效会计入时间点
                        }
                    }
                }
                else if (skillInfo.skillData.aoeEffects.Length > 0)
                {
                    #endregion
                    PlayAOEEffects(0f, layer);
                }

                #endregion
                #region fly effects
                else
                {
                    bool         isLastTarget = false;
                    List <float> timelineKeys = skillInfo.skillData.timeline.GetKeys();
                    Dictionary <CharacterEntity, int> judgeTypeDic = new Dictionary <CharacterEntity, int>();
                    for (int j = 0, count = timelineList.Count; j < count; j++)
                    {
                        Dictionary <uint, List <KeyValuePair <uint, uint> > > mechanicsDic = timelineList[j];
                        List <uint> mechanicsKeys = mechanicsDic.GetKeys();
                        List <Triple <float, float, float> > mechanicsValues = skillInfo.skillData.mechanicsValues[j];
                        for (int k = 0, kCount = mechanicsKeys.Count; k < kCount; k++)
                        {
                            uint mechanicsId = mechanicsKeys[k];
                            mechanicsData = MechanicsData.GetMechanicsDataById(mechanicsId);
                            List <KeyValuePair <uint, uint> > tids;
                            if (mechanicsData.mechanicsType == MechanicsType.Reborn)//获取重生目标
                            {
                                tids = CharacterUtil.FindDeadTargets(mechanicsData.rangeType, mechanicsData.targetType, isPlayer);
                                if (mechanicsData.rangeType == RangeType.All || mechanicsData.rangeType == RangeType.AllAbsolutely)
                                {
                                    tids.AddRange(CharacterUtil.FindAllTargets(mechanicsData.targetType, isPlayer));
                                }
                            }
                            else
                            {
                                if (mechanicsData.rangeType == RangeType.All || mechanicsData.rangeType == RangeType.AllAbsolutely)
                                {
                                    tids = CharacterUtil.FindAllTargets(mechanicsData.targetType, isPlayer);
                                }
                                else
                                {
                                    tids = mechanicsDic[mechanicsId];
                                }
                            }
                            Triple <float, float, float> mechanicsValue = mechanicsValues[k];
                            uint effectId = 0;
                            if (skillInfo.skillData.flyEffectIds.Count > j)
                            {
                                effectId = skillInfo.skillData.flyEffectIds[j];//所有目标都发射伤害特效
                            }
                            for (int m = 0, mCount = tids.Count; m < mCount; m++)
                            {
                                KeyValuePair <uint, uint> tid = tids[m];
                                if (m == mCount - 1 && k == kCount - 1 && j == count - 1)//最后一个移动特效
                                {
                                    isLastTarget = true;
                                }
                                else
                                {
                                    isLastTarget = false;
                                }
                                CharacterEntity target1 = CharacterUtil.FindTarget(mechanicsData.mechanicsType, mechanicsData.targetType, isPlayer, tid.Key);
                                CharacterEntity target2 = CharacterUtil.FindTarget(mechanicsData.mechanicsType, mechanicsData.targetType, isPlayer, tid.Value);
                                if (target1 == null)
                                {
                                    continue;
                                }
                                float delay = timelineKeys[j];

                                if (GameSetting.instance.effectable)
                                {
                                    EffectInfo effectInfo = new EffectInfo(effectId);
                                    if (effectInfo.effectData != null)
                                    {
                                        effectInfo.character      = character;
                                        effectInfo.skillInfo      = skillInfo;
                                        effectInfo.delay          = delay + effectInfo.effectData.delay;
                                        effectInfo.isLastTarget   = isLastTarget;
                                        effectInfo.target         = target1;
                                        effectInfo.mechanicsData  = mechanicsData;
                                        effectInfo.mechanicsValue = mechanicsValue;
                                        switch (effectInfo.effectData.effectType)
                                        {
                                        case EffectType.Root:
                                            //{
                                            //if (isPlayer != target1.isPlayer)//当目标为友方是不旋转
                                            //{
                                            //    PositionData positionData = PositionData.GetPostionDataById(target1.positionId);
                                            //    FightController.instance.Rotate(character.transform, positionData.position);
                                            //}
                                            effectInfo.rotateAngles = skillInfo.rotateAngles;
                                            //}
                                            break;

                                        case EffectType.LockTarget:    //锁定目标技能特效
                                            //{
                                            //    if (isPlayer != target1.isPlayer)
                                            //    {
                                            //        PositionData positionData = PositionData.GetPostionDataById(target1.positionId);
                                            //        FightController.instance.Rotate(character.transform, positionData.position);
                                            //    }
                                            //}
                                            effectInfo.rotateAngles = skillInfo.rotateAngles;
                                            break;

                                        case EffectType.Trace:
                                        case EffectType.CurveTrace:    //感觉跟直线轨迹是一样的
                                        {
                                            PositionData positionData = PositionData.GetPostionDataById(target1.positionId);
                                            //effectInfo.rotateAngles = FightController.instance.Rotate(character.transform, positionData.position);
                                            effectInfo.rotateAngles = skillInfo.rotateAngles;
                                            Vector3 offset = effectInfo.effectData.offset;
                                            if (!isPlayer)
                                            {
                                                offset.x *= -1;
                                            }
                                            effectInfo.pos = PositionData.GetPostionDataById(character.positionId).position + offset;
                                            float positionRow = PositionData.GetEnemyPositionLevels(character.positionId, target1.positionId);
                                            effectInfo.time = effectInfo.effectData.moveTime * (positionRow * GameConfig.timePercent + 1f);
                                            Vector3 endOffset = effectInfo.effectData.endOffset;
                                            if (!isPlayer)
                                            {
                                                endOffset.x *= -1;
                                            }
                                            effectInfo.endPos = positionData.position + endOffset + new Vector3(0, target1.height * 0.6f, 0);
                                        }
                                        break;
                                        }
                                        delay += effectInfo.effectData.delay + effectInfo.time;
                                        EffectController.instance.PlayEffect(effectInfo, layer);
                                    }
                                }
                                if (FightController.instance.fightStatus == FightStatus.Normal)//矫正因暂停导致时间线推迟
                                {
                                    delay -= skillInfo.skillData.pauseTime;
                                }
                                int judgeType = 0;
                                if (!judgeTypeDic.ContainsKey(target1))
                                {
                                    judgeType             = JudgeUtil.GetJudgeResult(character, target1, target2, (int)skillInfo.skillData.skillId);
                                    judgeTypeDic[target1] = judgeType;
                                    if (judgeType == 0)
                                    {
                                        EffectController.instance.RemoveEffectByPrefabName(EffectController.SPEED_LINE);
                                    }
                                }
                                else
                                {
                                    judgeType = judgeTypeDic[target1];
                                }
                                if (isPlayer)
                                {
                                    MechanicsController.instance.PlayerMechanics(skillInfo, mechanicsData, character, target1, target2, mechanicsValue, delay, judgeType, isLastTarget);
                                }
                                else
                                {
                                    MechanicsController.instance.EnemyMechanics(skillInfo, mechanicsData, character, target1, target2, mechanicsValue, delay, judgeType, isLastTarget);
                                }
                            }
                        }
                    }
                    judgeTypeDic.Clear();
                    judgeTypeDic = null;
                }
                #endregion
            }
            for (int i = 0, count = skillInfo.skillData.audioIds.Count; i < count; i++)
            {
                AudioData audioData = AudioData.GetAudioDataById(skillInfo.skillData.audioIds[i]);
                if (audioData != null)
                {
                    AudioController.instance.PlayAudio(audioData.audioName, !audioData.accelerate, skillInfo.skillData.audioDelay);
                }
            }

            Hero.Model.HeroData heroData        = Hero.Model.HeroData.GetHeroDataByID((int)character.characterInfo.baseId);
            AudioData           attackAudioData = AudioData.GetAudioDataById(heroData.audioAttack);
            if (attackAudioData != null)
            {
                AudioController.instance.PlayAudio(attackAudioData.audioName, !attackAudioData.accelerate);
            }
            #endregion
            finish = true;
        }