人类士兵技能
This commit is contained in:
1 parent
9572db06ad
commit
f6f6666244
39 files changed
+25070
-60
No files matched your search
@@ -239,12 +239,16 @@ public class WorldHealthBar : MonoBehaviour
|
||||
|
||||
currentHealth = Mathf.Clamp(value, 0f, maxHealth);
|
||||
UpdateFill();
|
||||
OnHealthChanged?.Invoke(currentHealth, maxHealth);
|
||||
if (currentHealth <= 0f)
|
||||
{
|
||||
Die();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>生命值变化事件:参数为 (当前血量, 最大血量)</summary>
|
||||
public System.Action<float, float> OnHealthChanged;
|
||||
|
||||
/// <summary>护盾吸收伤害事件:参数为实际吸收的伤害数值</summary>
|
||||
public System.Action<float> OnShieldAbsorbedDamage;
|
||||
|
||||
|
||||
Reference in new issue
Block a user