Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| New file |
| | |
| | | public class PN_PlayEffect : ProcessNode |
| | | { |
| | | public PN_PlayEffect(GA_NpcClientFightNorm npc, int effectID) |
| | | { |
| | | m_Target = npc; |
| | | param = effectID; |
| | | } |
| | | |
| | | public sealed override void Init() |
| | | { |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("进入播放特效: {0} 节点", param); |
| | | #endif |
| | | m_Target.ProcessEffectDict[param] = SFXPlayUtility.Instance.PlayBattleEffect(param, m_Target); |
| | | } |
| | | |
| | | public sealed override bool IsOver() |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | public sealed override void UnInit() |
| | | { |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("{0} 特效播放结束", param); |
| | | #endif |
| | | } |
| | | |
| | | public sealed override void Update() |
| | | { |
| | | } |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 4d0e6d13d15d331489320b866adbc64f |
| | | timeCreated: 1556259744 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | using System; |
| | | using Snxxz.UI; |
| | | |
| | | public class PN_ShowMotion : ProcessNode |
| | | { |
| | | private bool m_BossShowFinished = false; |
| | | |
| | | public PN_ShowMotion(GA_NpcClientFightNorm npc, int id) |
| | | { |
| | | m_Target = npc; |
| | |
| | | |
| | | public override void Init() |
| | | { |
| | | m_BossShowFinished = false; |
| | | m_Target.IdleImmediate(); |
| | | |
| | | GA_Hero _hero = PlayerDatas.Instance.hero; |
| | |
| | | UnityEngine.Debug.LogFormat("开始播放动画: {0}", param); |
| | | #endif |
| | | |
| | | var _actorShow = ActorShowConfig.Get(param); |
| | | BossShowModel.Instance.Start(PlayerDatas.Instance.baseData.MapID, _actorShow.NpcID); |
| | | BossShowModel.Instance.bossShowCompletedEvent += CompeleteEvent; |
| | | m_Target.isTalking = true; |
| | | } |
| | | |
| | | private void CompeleteEvent() |
| | | { |
| | | m_BossShowFinished = true; |
| | | } |
| | | |
| | | public override bool IsOver() |
| | | { |
| | | return true; |
| | | return m_BossShowFinished; |
| | | } |
| | | |
| | | public override void UnInit() |
| New file |
| | |
| | | public class PN_StopEffect : ProcessNode |
| | | { |
| | | public PN_StopEffect(GA_NpcClientFightNorm npc, int effectID) |
| | | { |
| | | m_Target = npc; |
| | | param = effectID; |
| | | } |
| | | |
| | | public sealed override void Init() |
| | | { |
| | | SFXController _sfx; |
| | | if (m_Target.ProcessEffectDict.TryGetValue(param, out _sfx)) |
| | | { |
| | | SFXPlayUtility.Instance.Release(_sfx); |
| | | m_Target.ProcessEffectDict.Remove(param); |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("进入停止特效: {0} 节点", param); |
| | | #endif |
| | | } |
| | | } |
| | | |
| | | public sealed override bool IsOver() |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | public sealed override void UnInit() |
| | | { |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("{0} 特效停止结束", param); |
| | | #endif |
| | | } |
| | | |
| | | public sealed override void Update() |
| | | { |
| | | } |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 3862ee948299a1e4eac6ebda910c9497 |
| | | timeCreated: 1556267161 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | case ProcessNode.E_ProcessType.StopAI: |
| | | m_NodeQueue.Enqueue(new PN_StopAI(npc, _node.param)); |
| | | break; |
| | | case ProcessNode.E_ProcessType.PlayEffect: |
| | | m_NodeQueue.Enqueue(new PN_PlayEffect(npc, _node.param)); |
| | | break; |
| | | case ProcessNode.E_ProcessType.StopEffect: |
| | | m_NodeQueue.Enqueue(new PN_StopEffect(npc, _node.param)); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | |
| | | ShowMotion, |
| | | WaitTime, |
| | | StopAI, |
| | | PlayEffect, |
| | | StopEffect, |
| | | } |
| | | |
| | | public int param; |
| | |
| | | { |
| | | _Item(ref _node, "停止AI"); |
| | | } |
| | | else if (_node.nodeType == ProcessNode.E_ProcessType.PlayEffect) |
| | | { |
| | | _Item(ref _node, "播放特效"); |
| | | } |
| | | else if (_node.nodeType == ProcessNode.E_ProcessType.StopEffect) |
| | | { |
| | | _Item(ref _node, "停止特效"); |
| | | } |
| | | EditorGUILayout.EndVertical(); |
| | | EditorGUILayout.BeginVertical(); |
| | | if (GUILayout.Button("删除", GUILayout.Height(20))) |
| | |
| | |
|
| | | skill.hurtClntFightNpcList.Add(_hurtObject);
|
| | |
|
| | | if (_target.ActorInfo.RealHp <= _hurtValue)
|
| | | if (_target.ActorInfo.RealHp <= _hurtValue && (_clientNpc == null || _clientNpc.lockHp <= 0))
|
| | | {
|
| | | if (_clientNpc.NpcConfig.AIType != 198)
|
| | | {
|
| | |
| | | using Snxxz.UI; |
| | | using UnityEngine; |
| | | using System.Collections.Generic; |
| | | |
| | | public class GA_NpcClientFightNorm : GActorNpcFight |
| | | { |
| | |
| | | |
| | | public bool lockCommonAtk = false; |
| | | public int lockSkillID = -1; |
| | | |
| | | public Dictionary<int, SFXController> ProcessEffectDict = new Dictionary<int, SFXController>(); |
| | | |
| | | public void AutoAI() |
| | | { |
| | |
| | | HeroRoundGird.Instance.Release(posIndex); |
| | | posIndex = -1; |
| | | } |
| | | |
| | | foreach (var _sfx in ProcessEffectDict.Values) |
| | | { |
| | | SFXPlayUtility.Instance.Release(_sfx); |
| | | } |
| | | ProcessEffectDict.Clear(); |
| | | |
| | | base.OnUnit(); |
| | | } |
| | | |
| | |
| | | var _animNodde = m_AppearEffect.GetComponent<Animator>("Animation");
|
| | | if (_animNodde)
|
| | | {
|
| | | _animNodde.Play(GAStaticDefine.State_DeadHash);
|
| | | if (_animNodde.HasState(0, GAStaticDefine.State_DeadHash))
|
| | | {
|
| | | _animNodde.Play(GAStaticDefine.State_DeadHash);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (m_Animator)
|
| | | {
|
| | | m_Animator.Play(stateNameHash, 0, normalizeTime);
|
| | | if (m_Animator.HasState(0, stateNameHash))
|
| | | {
|
| | | m_Animator.Play(stateNameHash, 0, normalizeTime);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|