From 40b918d5189a154bc0ff31627e69867742934720 Mon Sep 17 00:00:00 2001 From: chenxin <chenxin6991@163.com> Date: Tue, 17 Nov 2020 21:10:05 +0800 Subject: [PATCH] buff补充 --- Assets/Scripts/TowerDefense/Agents/Agent.cs | 30 +++++++----------------------- 1 files changed, 7 insertions(+), 23 deletions(-) diff --git a/Assets/Scripts/TowerDefense/Agents/Agent.cs b/Assets/Scripts/TowerDefense/Agents/Agent.cs index 2adf91e..546bfa3 100644 --- a/Assets/Scripts/TowerDefense/Agents/Agent.cs +++ b/Assets/Scripts/TowerDefense/Agents/Agent.cs @@ -866,7 +866,8 @@ if (state == ActionState) return; ActionState = state; - ActionAnimator.SetInteger(paramName, (int)state); + if (ActionAnimator != null) + ActionAnimator.SetInteger(paramName, (int)state); } /// <summary> @@ -1054,8 +1055,11 @@ public void PlayOnHitImmediately() { ChangeState(AgentActionState.GetHit); - ActionAnimator.Play("GetHit", 0, 0); - ActionAnimator.Update(0); + if (ActionAnimator) + { + ActionAnimator.Play("GetHit", 0, 0); + ActionAnimator.Update(0); + } } /// <summary> @@ -1065,26 +1069,6 @@ { if (FireSkillParticle != null) FireSkillParticle.Play(); - } - - public void PlayGetHitParticle(int attributeId) - { - //这里的id是BallisticAttack上面设置的 - if (attributeId == 10101) - { - //10101 火 - - } - else if (attributeId == 20101) - { - //20101 水 - - } - else if (attributeId == 30101) - { - //30101 木 - - } } public void PlayAttack() -- Gitblit v1.9.1