新增game hud字体

移除旧版血量控制
This commit is contained in:
2026-07-04 15:22:46 +08:00
parent 08dec79a6e
commit c8e66f72b1
11 changed files with 460 additions and 110 deletions
@@ -1,5 +1,5 @@
using UnityEngine;
using UnityEngine.SceneManagement;
using GameFramework;
namespace IndianOceanAssets.Engine2_5D
{
// Handles health, damage, and death for entities
@@ -27,15 +27,13 @@ namespace IndianOceanAssets.Engine2_5D
{
health -= damageAmount;
// Update UI if player
if (isPlayer)
HealthUI.Instance.UpdateHealthBar(maxHealth, health);
// If dead, reload scene if player, then die
// If dead, trigger game over if player, then die
if (health <= 0)
{
if (isPlayer)
HealthUI.Instance.ReloadScene();
{
GameManager.GameOver();
}
Die();
}
}