新增game hud字体
移除旧版血量控制
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user