少年修仙传客户端代码仓库
client_linchunjie
2019-06-22 54206d469b368e54026df6db8692ffd93d41efe6
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
2个文件已添加
6个文件已修改
100 ■■■■ 已修改文件
Fight/Actor/AI/Process/PN_ChangeHitSound.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/PN_ChangeHitSound.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/PN_ShowSkillTip.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/ProcessManager.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/ProcessNode.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/SoProcessNode.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/Skill/AttackHandler.cs 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcClientFightNorm.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/PN_ChangeHitSound.cs
New file
@@ -0,0 +1,27 @@
public class PN_ChangeHitSound : ProcessNode
{
    public PN_ChangeHitSound(GA_NpcClientFightNorm npc, int id)
    {
        intParam = id;
        m_Target = npc;
    }
    public override void Init()
    {
        m_Target.hitSoundId = intParam;
    }
    public override bool IsOver()
    {
        return true;
    }
    public override void UnInit()
    {
        m_Target = null;
    }
    public override void Update()
    {
    }
}
Fight/Actor/AI/Process/PN_ChangeHitSound.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 532d4e29231d2c24ba865b6b8117a299
timeCreated: 1561176326
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Fight/Actor/AI/Process/PN_ShowSkillTip.cs
@@ -20,6 +20,11 @@
            BossNotify.OnNotifyStateEvent += OnNotifyCompelete;
        }
        if (intParam == 10200)
        {
            SoundPlayer.Instance.PlayNpcAudio(825);
        }
#if UNITY_EDITOR
        if (RuntimeLogUtility.s_LogProcessInfo)
        {
Fight/Actor/AI/Process/ProcessManager.cs
@@ -10,11 +10,11 @@
    private const string SoProcessNode_Suffix = "SoProcessNode_";
    private Queue<ProcessNode> m_NodeQueue = new Queue<ProcessNode>();
    private ProcessNode m_Current;
    public ProcessNode Current { get; private set; }
    public void UnLoad()
    {
        m_Current = null;
        Current = null;
        foreach (var _node in m_NodeQueue)
        {
            _node.UnInit();
@@ -108,6 +108,9 @@
                case ProcessNode.E_ProcessType.FallAndRelease:
                    m_NodeQueue.Enqueue(new PN_FallAndRelease(npc));
                    break;
                case ProcessNode.E_ProcessType.ChangeHitSound:
                    m_NodeQueue.Enqueue(new PN_ChangeHitSound(npc, _node.param));
                    break;
            }
        }
    }
@@ -121,10 +124,10 @@
        var _node = m_NodeQueue.Peek();
        if (m_Current != _node)
        if (Current != _node)
        {
            _node.Init();
            m_Current = _node;
            Current = _node;
        }
        _node.Update();
Fight/Actor/AI/Process/ProcessNode.cs
@@ -20,6 +20,7 @@
        ShowSkillTip,
        DieNoFall,
        FallAndRelease,
        ChangeHitSound,
    }
    public int intParam;
Fight/Actor/AI/Process/SoProcessNode.cs
@@ -122,6 +122,11 @@
            {
            }
            else if (_node.nodeType == ProcessNode.E_ProcessType.ChangeHitSound)
            {
                _Item(ref _node, "改变受击音效");
            }
            EditorGUILayout.EndVertical();
            EditorGUILayout.BeginVertical();
            if (GUILayout.Button("删除", GUILayout.Height(20)))
Fight/Actor/Skill/AttackHandler.cs
@@ -78,10 +78,25 @@
                          SFXPlayUtility.Instance.PlayEffectAsync(soConfig.hitEffectId,
                                                                  target.Root.position,
                                                                  Vector3.forward);
                    // 播放受击音效
                    if (target.ActorType == GameObjType.gotNPC)
                    bool _isPlayHurtAudio = false;
                    var _cNpc = target as GA_NpcClientFightNorm;
                    if (_cNpc != null)
                    {
                        target.PlayHurtAudio(attacker);
                        if (_cNpc.hitSoundId > 0)
                        {
                            target.PlaySkillAudio(_cNpc.hitSoundId);
                            _isPlayHurtAudio = true;
                        }
                    }
                    if (!_isPlayHurtAudio)
                    {
                        // 播放受击音效
                        if (target.ActorType == GameObjType.gotNPC)
                        {
                            target.PlayHurtAudio(attacker);
                        }
                    }
                }
            }
Fight/GameActor/GA_NpcClientFightNorm.cs
@@ -4,7 +4,8 @@
public class GA_NpcClientFightNorm : GActorNpcFight
{
    private ProcessManager m_ProcessManager;
    public ProcessManager ProcessManager { get; private set; }
    public bool dieNoFall = false;
    public UnityEngine.Events.UnityAction<uint, int> OnAttackObj;
    public UnityEngine.Events.UnityAction<uint, int> OnBeAttack;
@@ -34,6 +35,7 @@
    public bool lockCommonAtk = false;
    public int lockSkillID = -1;
    public int hitSoundId = 0;
    public Dictionary<int, SFXController> ProcessEffectDict = new Dictionary<int, SFXController>();
@@ -147,11 +149,11 @@
        AutoAI();
        if (m_ProcessManager == null)
        if (ProcessManager == null)
        {
            m_ProcessManager = new ProcessManager();
            ProcessManager = new ProcessManager();
        }
        m_ProcessManager.Load(this);
        ProcessManager.Load(this);
        InitAI();
    }
@@ -218,9 +220,9 @@
            m_NPCInteractProcessor = null;
        }
        if (m_ProcessManager != null)
        if (ProcessManager != null)
        {
            m_ProcessManager.UnLoad();
            ProcessManager.UnLoad();
        }
        if (m_AIHandler != null)
@@ -274,9 +276,9 @@
            return;
        }
        if (m_ProcessManager != null)
        if (ProcessManager != null)
        {
            m_ProcessManager.Update();
            ProcessManager.Update();
        }
        if (m_AIHandler != null)