From cbe42ad621dba92dff20e4fc5704f5d90973acbf Mon Sep 17 00:00:00 2001 From: GL <2365963573@qq.com> Date: Mon, 6 Jan 2025 16:52:14 +0800 Subject: [PATCH] died --- Role/Role.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Role/Role.cs b/Role/Role.cs index 2681181..57d4e17 100644 --- a/Role/Role.cs +++ b/Role/Role.cs @@ -319,13 +319,17 @@ public class Role : Fun if (lsanimationHighlight == dieIndex) { - SpawnPool.intance.DeadNumber += 1; - Destroy(gameObject); + //SpawnPool.intance.DeadNumber += 1; + SpawnMonster.intance.enemysList.Remove(this.gameObject); if (SpawnMonster.intance.enemysList.Count<=0) { SpawnMonster.intance.Index += 1; } + + Destroy(gameObject); + Destroy(this); + //IsDead = true; } if (lsanimationHighlight == hitIndex)