增加受击泛红效果

This commit is contained in:
2026-07-04 16:07:08 +08:00
parent d63f0c3fa7
commit fc585fa67e
6 changed files with 253 additions and 2 deletions
+7
View File
@@ -57,6 +57,13 @@ namespace GameFramework
UpdateSoulCount(ScoreManager.Instance != null ? ScoreManager.Instance.CurrentScore : 0);
UpdateLifeIcons();
// 自动创建受击泛红特效(如果场景中没有)
if (FindObjectOfType<DamageFlashOverlay>() == null)
{
var overlayObj = new GameObject("DamageFlashOverlay");
overlayObj.AddComponent<DamageFlashOverlay>();
}
}
void OnDestroy()