用一个 _isStopped 布尔门替代 id 追踪: - OnReset 开头置 _isStopped = true - OnInit 置 _isStopped = false - OnShowEntitySuccess:只要 _isStopped 为真且是 Enemy 组,立即 HideEntity - SpawnEnemyAsync await 恢复后也补一道 _isStopped 检查(若 await 拿到了 enemy 且已停战,直接 hide 不注册)——双保险 为什么这样对:停战窗口(Shop/LevelUp)期间本就不该有任何敌人,所以"停战期间出生的敌人一律 hide"在语义上完全正确,且不受 await 同步抽空、id 复用、加载时序任何影响。 |
||
|---|---|---|
| .. | ||
| GameFramework | ||
| GameMain | ||
| Launcher | ||
| Plugins | ||
| Resources | ||
| StreamingAssets | ||
| Tests | ||
| TextMesh Pro | ||
| GameFramework.meta | ||
| GameMain.meta | ||
| Launcher.meta | ||
| Launcher.unity | ||
| Launcher.unity.meta | ||
| PlayerInputActions.inputactions | ||
| PlayerInputActions.inputactions.meta | ||
| Plugins.meta | ||
| Resources.meta | ||
| StreamingAssets.meta | ||
| Tests.meta | ||
| TextMesh Pro.meta | ||