| Fight/Actor/AI/HeroAIHandler.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/Actor/AI/HeroAI_Auto.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/Actor/AI/HeroAI_Base.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/Actor/AI/HeroAI_KillUntilDie.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/Actor/HeroBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/Actor/UserInputHandler.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/PreFightMission.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Fight/Actor/AI/HeroAIHandler.cs
@@ -88,6 +88,7 @@ // 已经执行完毕, 退出状态 m_Current.Exit(); m_Current = null; currentType = E_HeroAIType.None; } // 遍历所有状态, 决定此次进入哪个状态 Fight/Actor/AI/HeroAI_Auto.cs
@@ -51,7 +51,7 @@ m_LastUseSkillTime = 0; m_PauseStartTime = 0; m_LockTargetSID = 0; m_UserClickSkillID = 0; m_UserClickSkillID = -1; m_NeedMoveToPos = false; m_HandUpSkill = null; m_State = 0; @@ -216,11 +216,9 @@ } } // 决策此次要使用的技能 _skill = DecideUserSkill(m_HandUpSkill); break; case 1:// 暂停状态 if (m_NeedMoveToPos) { if (StatusMgr.Instance.CanMove(PlayerDatas.Instance.PlayerId)) @@ -234,28 +232,9 @@ m_NeedMoveToPos = false; } if (m_UserClickSkillID == 0) { int _index = _hero.nextComAtkIndex; if (_index == -1) { _index = 0; } m_UserClickSkillID = _hero.GetCommonSkillID(_index); } if (m_UserClickSkillID != -1 && CanCastActiveUse(m_UserClickSkillID)) { // 决策此次要使用的技能 m_DecideSkill = _hero.SkillMgr.Get(m_UserClickSkillID); m_UserClickSkillID = -1; } else { if (Time.realtimeSinceStartup - m_PauseStartTime > m_PauseResumeTime) { m_State = 0; } } break; @@ -267,9 +246,20 @@ return; } if (m_DecideSkill != null) if (m_UserClickSkillID == 0) { _skill = m_DecideSkill; int _index = _hero.nextComAtkIndex; if (_index == -1) { _index = 0; } m_UserClickSkillID = _hero.GetCommonSkillID(_index); } if (m_State == 0 || m_UserClickSkillID != -1) { // 决策此次要使用的技能 _skill = DecideUserSkill(m_HandUpSkill, m_UserClickSkillID); } if (_skill == null) @@ -277,15 +267,6 @@ return; } bool _forceMove = _skill.skillInfo.soFile != null && _skill.skillInfo.soFile.forceMove; if (!_forceMove && !IsSkillNeedMove(_skill.skillInfo.config.Tag, (E_SkillType)_skill.skillInfo.config.SkillType)) { _hero.Behaviour.DoAttack(_skill); m_DecideSkill = null; } else { // 判断周围是否有可攻击目标 GActorFight _atkTarget = null; @@ -312,6 +293,16 @@ else { _atkTarget = SelectTarget(); } bool _forceMove = _skill.skillInfo.soFile != null && _skill.skillInfo.soFile.forceMove; if (_atkTarget == null || _atkTarget.ActorInfo.serverDie || (!_forceMove && !IsSkillNeedMove(_skill.skillInfo.config.Tag, (E_SkillType)_skill.skillInfo.config.SkillType))) { _hero.Behaviour.DoAttack(_skill); m_DecideSkill = null; return; } if (_atkTarget == null) @@ -352,8 +343,11 @@ // 停止冲锋逻辑 _hero.StopRush(); if (IsSkillNeedMove(_skill.skillInfo.config.Tag, (E_SkillType)_skill.skillInfo.config.SkillType)) { Vector3 _forward = MathUtility.ForwardXZ(_atkTarget.Pos, _hero.Pos); _hero.destForward = _hero.Forward = _forward; } // 判断是否普通, 调用不同的接口 if (_hero.Behaviour.IsComAtk(_skill.id)) @@ -380,7 +374,7 @@ m_UserClickSkillID = -1; } } } m_LastUseSkillTime = Time.realtimeSinceStartup; } @@ -424,6 +418,15 @@ { _hero.StopRush(); } Skill _skill = _hero.SkillMgr.CurCastSkill; if (_skill != null) { if (!_skill.SkillCompelete) { m_UserClickSkillID = -1; } } } private Vector3 m_TargetPos; @@ -460,8 +463,6 @@ // SysNotifyMgr.Instance.ShowTip("HookPrompt_Manual"); //} m_NeedMoveToPos = false; m_PauseStartTime = Time.realtimeSinceStartup; m_State = 1; } private void OnLockTargetChanged(uint sid) Fight/Actor/AI/HeroAI_Base.cs
@@ -22,7 +22,7 @@ protected int xpSkillID = 0; protected Skill DecideUserSkill(int[] skillList = null) protected Skill DecideUserSkill(int[] skillList = null, int priorSkillId = -1) { GA_Hero _hero = PlayerDatas.Instance.hero; if (_hero == null || !_hero.CanCastSkill()) @@ -32,6 +32,18 @@ Skill _skill = null; if (priorSkillId >= 0) { if (CanCast(priorSkillId)) { _skill = _hero.SkillMgr.Get(priorSkillId); if (_skill != null) { return _skill; } } } // 判断是否需要使用加血技能 float _curHpPer = PlayerDatas.Instance.baseData.HP * 1f / PlayerDatas.Instance.extersion.MaxHP; if (_curHpPer < _hero.JobSetup.HpPerUseSkill * Constants.F_DELTA) Fight/Actor/AI/HeroAI_KillUntilDie.cs
@@ -85,7 +85,11 @@ private void OnUserClickSkill(int skillID) { GActor _target = GAMgr.Instance.GetBySID(m_TargetID); if (_target != null && !_target.ActorInfo.serverDie) { m_FirstSkill = skillID; } } public override void Update() @@ -298,6 +302,11 @@ // Debug.Log("已切换ai行为"); //} // if (m_LimitOnce) // { // Debug.Log("释放过一次技能"); // } return (_target == null || !_target.CanAtked() || m_ActiveInterrupt @@ -313,8 +322,10 @@ m_ActiveInterrupt = true; GA_Hero _hero = PlayerDatas.Instance.hero; if (_hero != null) { _hero.aiHandler.currentType = E_HeroAIType.None; } } private void OnClickFloor(Vector3 dest) @@ -322,6 +333,9 @@ m_ActiveInterrupt = true; GA_Hero _hero = PlayerDatas.Instance.hero; if (_hero != null) { _hero.aiHandler.currentType = E_HeroAIType.None; } } } Fight/Actor/HeroBehaviour.cs
@@ -143,7 +143,6 @@ } } if (m_Hero.aiHandler.currentType == E_HeroAIType.None) { byte _type = (byte)E_HeroAIType.KillUntilDie; @@ -155,12 +154,14 @@ _data.defaultSkillID = m_WillUsedSkillID; m_Hero.aiHandler.currentType = E_HeroAIType.KillUntilDie; } else { if (OnUserClickSkill != null) { OnUserClickSkill(m_WillUsedSkillID); } } } public void StopKillUntilDieAI() { Fight/Actor/UserInputHandler.cs
@@ -57,7 +57,7 @@ float KeyVertical = Input.GetAxis("Vertical"); float KeyHorizontal = Input.GetAxis("Horizontal"); if (Input.GetKey(KeyCode.J)) if (Input.GetKeyUp(KeyCode.J)) { _hero.ComAtk(); } Fight/PreFightMission.cs
@@ -902,7 +902,7 @@ _model2.clickClosed = false; m_AfterAttackType = E_AfterAttackType.RefreshRock; HeroBehaviour.OnUserClickSkill += OnCastSkill; HeroBehaviour.onCastSkill += OnCastSkill; _model2.onClose = null; @@ -1146,7 +1146,7 @@ private void OnCastSkill(int skillID) { HeroBehaviour.OnUserClickSkill -= OnCastSkill; HeroBehaviour.onCastSkill -= OnCastSkill; if (m_AfterAttackType == E_AfterAttackType.RefreshRock) { @@ -1612,7 +1612,7 @@ _temp = WindowCenter.Instance.Get<MainInterfaceWin>().transform.Find("CopyOfThePanel/HighSettingTip/Container_Treasure"); _temp.gameObject.SetActive(true); _temp = WindowCenter.Instance.Get<MainInterfaceWin>().transform.Find("MainInterfaceWin/InGameDownLoadProgress"); _temp = WindowCenter.Instance.Get<MainInterfaceWin>().transform.Find("InGameDownLoadProgress"); _temp.localScale = Vector3.one; _temp = WindowCenter.Instance.Get<MainInterfaceWin>().transform.Find("SkillButtonTip/Pivot/CastSkillTip/SwitchPan_a");