优化技能CD时间
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user