少年修仙传客户端代码仓库
client_Hale
2019-04-20 b2b4a08b290dc190c09dfdfcadb37668df669fb2
382 前端战斗AI流程控制逻辑
2 文件已重命名
15个文件已修改
113 ■■■■■ 已修改文件
Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA126_tagMCPrepareChangeMap.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/AI_Boss_HYQ.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/AI_Npc_200.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/PN_AutoAI.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/PN_BeAttackCount.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/PN_CastSkill.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/PN_CommonAttack.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/PN_Die.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/PN_HpPer.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/PN_LockHp.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/PN_OpenDialog.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/PN_ShowMotion.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/ProcessManager.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/ProcessManager.cs.meta 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcClientFightNorm.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcFunc.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/MapEditor/Game/ClientSceneManager.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA126_tagMCPrepareChangeMap.cs
@@ -54,6 +54,7 @@
            GA_Hero.s_MapSwitching = true;
        }
        ClientSceneManager.Instance.ExitClientFightMode();
    }
}
Fight/Actor/AI/AI_Boss_HYQ.cs
@@ -26,7 +26,7 @@
    public override void Update()
    {
        if (m_InShow)
        if (m_Owner.isTalking)
        {
            return;
        }
Fight/Actor/AI/AI_Npc_200.cs
@@ -9,6 +9,11 @@
    public override void Update()
    {
        if (m_Owner.isTalking)
        {
            return;
        }
        // ai休眠时间
        if (Time.realtimeSinceStartup - m_LastThinkTime > m_SleepTime)
        {
Fight/Actor/AI/Process/PN_AutoAI.cs
@@ -2,6 +2,9 @@
{
    public override void Init()
    {
#if UNITY_EDITOR
        UnityEngine.Debug.LogFormat("恢复自动AI状态");
#endif
    }
    public override bool IsOver()
Fight/Actor/AI/Process/PN_BeAttackCount.cs
@@ -14,11 +14,17 @@
    public sealed override void Init()
    {
        m_Target.OnAttacked += OnBeAttacked;
#if UNITY_EDITOR
        UnityEngine.Debug.LogFormat("开始计算被攻击次数");
#endif
    }
    private void OnBeAttacked()
    {
        m_BeAttackCount += 1;
#if UNITY_EDITOR
        UnityEngine.Debug.LogFormat("被攻击次数: {0}", m_BeAttackCount);
#endif
    }
    public sealed override bool IsOver()
@@ -29,6 +35,9 @@
    public sealed override void UnInit()
    {
        m_Target.OnAttacked -= OnBeAttacked;
#if UNITY_EDITOR
        UnityEngine.Debug.LogFormat("被攻击检测节点结束");
#endif
    }
    public sealed override void Update()
Fight/Actor/AI/Process/PN_CastSkill.cs
@@ -9,6 +9,9 @@
    public sealed override void Init()
    {
        m_Target.lockSkillID = param;
#if UNITY_EDITOR
        UnityEngine.Debug.LogFormat("进入释放技能: {0} 节点", param);
#endif
    }
    public sealed override bool IsOver()
@@ -26,6 +29,9 @@
    public sealed override void UnInit()
    {
        m_Target.lockSkillID = -1;
#if UNITY_EDITOR
        UnityEngine.Debug.LogFormat("{0} 技能释放结束", param);
#endif
    }
    public sealed override void Update()
Fight/Actor/AI/Process/PN_CommonAttack.cs
@@ -8,6 +8,9 @@
    public override void Init()
    {
        m_Target.lockCommonAtk = true;
#if UNITY_EDITOR
        UnityEngine.Debug.LogFormat("开始锁定普攻");
#endif
    }
    public override bool IsOver()
Fight/Actor/AI/Process/PN_Die.cs
@@ -7,8 +7,13 @@
    public override void Init()
    {
        m_Target.ActorInfo.serverDie = true;
        GAMgr.Instance.ServerDie(m_Target.ServerInstID);
        GAMgr.Instance.Release(m_Target);
        m_Target.Die();
        GAMgr.Instance.DoDelayDie(m_Target);
#if UNITY_EDITOR
        UnityEngine.Debug.LogFormat("强制对象死亡");
#endif
    }
    public override bool IsOver()
Fight/Actor/AI/Process/PN_HpPer.cs
@@ -11,6 +11,9 @@
    public override void Init()
    {
#if UNITY_EDITOR
        UnityEngine.Debug.LogFormat("开始等待血量下降到: {0}", m_Target.ActorInfo.RealMaxHp * m_Per);
#endif
    }
    public override bool IsOver()
@@ -20,6 +23,9 @@
    public override void UnInit()
    {
#if UNITY_EDITOR
        UnityEngine.Debug.LogFormat("血量下降到: {0} 了", m_Target.ActorInfo.RealHp);
#endif
    }
    public override void Update()
Fight/Actor/AI/Process/PN_LockHp.cs
@@ -7,7 +7,20 @@
    }
    public override void Init()
    {
        m_Target.LockHp(param * Constants.F_BETA);
        if (param <= 0)
        {
            m_Target.LockHp(0);
#if UNITY_EDITOR
            UnityEngine.Debug.LogFormat("解除锁定血量");
#endif
        }
        else
        {
            m_Target.LockHp(param * Constants.F_BETA);
#if UNITY_EDITOR
            UnityEngine.Debug.LogFormat("开始锁定血量: {0}", param * Constants.F_BETA);
#endif
        }
    }
    public override bool IsOver()
Fight/Actor/AI/Process/PN_OpenDialog.cs
@@ -29,6 +29,7 @@
#if UNITY_EDITOR
        Debug.LogFormat("开始对话: {0}", param);
#endif
        m_Target.isTalking = true;
    }
    private void DialogFinish()
@@ -46,6 +47,7 @@
    public sealed override void UnInit()
    {
        m_Target.isTalking = false;
    }
    public sealed override void Update()
Fight/Actor/AI/Process/PN_ShowMotion.cs
@@ -17,6 +17,12 @@
            _hero.Behaviour.StopHandupAI();
            _hero.IdleImmediate();
        }
#if UNITY_EDITOR
        UnityEngine.Debug.LogFormat("开始播放动画: {0}", param);
#endif
        m_Target.isTalking = true;
    }
    public override bool IsOver()
@@ -26,6 +32,10 @@
    public override void UnInit()
    {
#if UNITY_EDITOR
        UnityEngine.Debug.LogFormat("动画: {0} 播放结束", param);
#endif
        m_Target.isTalking = false;
    }
    public override void Update()
Fight/Actor/AI/Process/ProcessManager.cs
File was renamed from Fight/Actor/AI/Process/ProcessManager.cs.cs
@@ -12,6 +12,17 @@
    private Queue<ProcessNode> m_NodeQueue = new Queue<ProcessNode>();
    private ProcessNode m_Current;
    public void UnLoad()
    {
        m_Current = null;
        foreach (var _node in m_NodeQueue)
        {
            _node.UnInit();
        }
        m_NodeQueue.Clear();
    }
    public void Load(GA_NpcClientFightNorm npc)
    {
        m_NodeQueue.Clear();
@@ -99,6 +110,7 @@
        if (_node.IsOver())
        {
            _node.UnInit();
            m_NodeQueue.Dequeue();
        }
    }
Fight/Actor/AI/Process/ProcessManager.cs.meta
File was renamed from Fight/Actor/AI/Process/ProcessManager.cs.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: bc619663298bfa443bcd0facb86a84ed
timeCreated: 1555593845
guid: 47f5e4702055fa647924fcf7645c5d72
timeCreated: 1555740004
licenseType: Pro
MonoImporter:
  serializedVersion: 2
Fight/GameActor/GA_NpcClientFightNorm.cs
@@ -40,6 +40,8 @@
        lockSkillID = -1;
    }
    public bool isTalking = false;
    private HeadUpName m_HeadUpName;
    private LifeBar m_LifeBar;
@@ -130,6 +132,9 @@
        // 战斗类型的怪物随机朝向
        Rotation = Quaternion.Euler(0, UnityEngine.Random.Range(0, 360), 0);
        m_ProcessManager = new ProcessManager();
        m_ProcessManager.Load(this);
        if (NpcConfig.AIType == 1)
        {
            m_AIHandler = new AI_Npc_200(this, BornPos);
@@ -191,6 +196,11 @@
            m_NPCInteractProcessor = null;
        }
        if (m_ProcessManager != null)
        {
            m_ProcessManager.UnLoad();
        }
        if (m_AIHandler != null)
        {
            m_AIHandler.UnInit();
@@ -235,6 +245,11 @@
            return;
        }
        if (m_ProcessManager != null)
        {
            m_ProcessManager.Update();
        }
        if (m_AIHandler != null)
        {
            m_AIHandler.Update();
Fight/GameActor/GA_NpcFunc.cs
@@ -76,10 +76,6 @@
            {
                _needHide = false;
            }
            else
            {
                _needHide = true;
            }
        }
        // 这里针对指定的NPC特殊矫正位置
Fight/Stage/MapEditor/Game/ClientSceneManager.cs
@@ -626,4 +626,13 @@
            GameNetSystem.Instance.SendInfo(_a225);
        }
    }
    public void ExitClientFightMode()
    {
        CA225_tagCMClientTaskCount _a225 = new CA225_tagCMClientTaskCount
        {
            CountID = 10000
        };
        GameNetSystem.Instance.SendInfo(_a225);
    }
}