From b5df614e9ce2f4068d2ab2dbdbe13a6c9e6f38d1 Mon Sep 17 00:00:00 2001 From: huyulong <1838407198@qq.com> Date: Fri, 13 Dec 2024 19:11:14 +0800 Subject: [PATCH] =?UTF-8?q?npc=E7=A7=BB=E5=8A=A8=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xiaofang/Assets/Script/npc/RecuseNpc.cs | 29 +++++++++++++------------ 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/xiaofang/Assets/Script/npc/RecuseNpc.cs b/xiaofang/Assets/Script/npc/RecuseNpc.cs index ce8d71e4..1da2ce81 100644 --- a/xiaofang/Assets/Script/npc/RecuseNpc.cs +++ b/xiaofang/Assets/Script/npc/RecuseNpc.cs @@ -89,6 +89,20 @@ public class RecuseNpc : MonoBehaviour private void Update() { + // 继续处理NPC的状态和动画 + switch (nstate) + { + case Npcstate.idle: + SetAni(2); + break; + case Npcstate.run: + movebool = true; + Run(currentTarget); + break; + case Npcstate.dead: + SetAni(0); + break; + } if (targetPoints.Count > 0) // 确保列表中有目标点 { @@ -118,20 +132,7 @@ public class RecuseNpc : MonoBehaviour } } - // 继续处理NPC的状态和动画 - switch (nstate) - { - case Npcstate.idle: - SetAni(2); - break; - case Npcstate.run: - movebool = true; - Run(currentTarget); - break; - case Npcstate.dead: - SetAni(0); - break; - } + } //移除第一个点