From 192f71057875c00a9db23c8fbbbd335897b5c646 Mon Sep 17 00:00:00 2001 From: wulongxiao <2545507770@qq.com> Date: Mon, 6 Jan 2025 14:51:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=8C=E4=BA=BA=E7=94=9F=E6=88=90=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Role/Role.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Role/Role.cs b/Role/Role.cs index 469bf9b..2681181 100644 --- a/Role/Role.cs +++ b/Role/Role.cs @@ -320,10 +320,12 @@ public class Role : Fun if (lsanimationHighlight == dieIndex) { SpawnPool.intance.DeadNumber += 1; - - Destroy(gameObject); - - + Destroy(gameObject); + SpawnMonster.intance.enemysList.Remove(this.gameObject); + if (SpawnMonster.intance.enemysList.Count<=0) + { + SpawnMonster.intance.Index += 1; + } } if (lsanimationHighlight == hitIndex)