优化一大波
This commit is contained in:
@@ -21,8 +21,8 @@ namespace GameFramework
|
||||
|
||||
public static GameState GameState
|
||||
{
|
||||
get => Instance.gameState;
|
||||
set => Instance.gameState = value;
|
||||
get => Instance != null ? Instance.gameState : GameState.Playing;
|
||||
set { if (Instance != null) Instance.gameState = value; }
|
||||
}
|
||||
|
||||
[SerializeField] private GameState gameState = GameState.Playing;
|
||||
@@ -68,6 +68,9 @@ namespace GameFramework
|
||||
/// </summary>
|
||||
private IEnumerator DeathTransition()
|
||||
{
|
||||
// 确保从暂停状态恢复(玩家可能在暂停时死亡)
|
||||
Time.timeScale = 1f;
|
||||
|
||||
// 等待一帧,让 HUD 先更新血量显示
|
||||
yield return null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user