优化最后一滴血时候显示的顺序问题

This commit is contained in:
2026-07-04 15:52:54 +08:00
parent 3394e0a4e9
commit d63f0c3fa7
+3
View File
@@ -61,6 +61,9 @@ namespace GameFramework
/// </summary> /// </summary>
private IEnumerator DeathTransition() private IEnumerator DeathTransition()
{ {
// 等待一帧,让 HUD 先更新血量显示(最后一滴血消失)
yield return null;
// 1. 查找玩家并禁用控制 // 1. 查找玩家并禁用控制
var player = GameObject.FindGameObjectWithTag("Player"); var player = GameObject.FindGameObjectWithTag("Player");
if (player != null) if (player != null)