优化技能CD时间

This commit is contained in:
2026-07-05 21:36:06 +08:00
parent ad90d35bd7
commit c7279fd1a7
6 changed files with 150 additions and 3 deletions
+14
View File
@@ -100,6 +100,20 @@ namespace GameFramework
Debug.Log("[GameHUD] 延迟订阅 ScoreManager.onScoreChanged 成功");
}
// 延迟查找玩家(GameSpawnManager 可能比 HUD 晚创建玩家)
if (_playerHealth == null)
{
var player = GameObject.FindWithTag("Player");
if (player != null)
{
_playerHealth = player.GetComponent<HealthSystem>();
_lanternSystem = player.GetComponent<SpiritLanternSystem>();
_echoSystem = player.GetComponent<EchoSystem>();
_playerController = player.GetComponent<PlayerController>();
Debug.Log("[GameHUD] 延迟找到玩家,已绑定组件");
}
}
UpdateLifeIcons();
UpdateSkillCooldowns();
}