```
feat(WerewolfSkill): 狂暴狼人技能系统重构为吸血战坦体系 - 实现完整的嗜血狂暴技能体系:1级嗜血狂暴、3级血脉沸腾、 6级残虐血性、10级不灭狼王四个阶段 - 添加重抓撕咬动画效果和鲜血飞溅特效 - 实现扇形AOE撕裂攻击和吸血回复机制 - 添加背水一战机制:血量越低减伤和吸血越高 - 实现击杀刷新技能时间的连击机制 - 更新狼人定位从快速近战改为吸血战坦 - 添加全局单位击杀事件监听处理 ```
This commit is contained in:
1 parent
1a84ea999e
commit
2ff98e8923
18 files changed
+24289
-23
No files matched your search
@@ -252,6 +252,9 @@ public class WorldHealthBar : MonoBehaviour
|
||||
/// <summary>护盾吸收伤害事件:参数为实际吸收的伤害数值</summary>
|
||||
public System.Action<float> OnShieldAbsorbedDamage;
|
||||
|
||||
/// <summary>全局单位击杀事件:参数为 (受害者 GameObject, 击杀者 GameObject)</summary>
|
||||
public static event System.Action<GameObject, GameObject> OnUnitKilled;
|
||||
|
||||
// 让单位受到伤害,并弹出伤害数字。
|
||||
// attacker: 攻击者,用于判断受击者(自己)是敌是友,决定数字颜色和浮动方向
|
||||
public void TakeDamage(float amount, GameObject attacker = null)
|
||||
@@ -273,6 +276,10 @@ public class WorldHealthBar : MonoBehaviour
|
||||
if (amount > 0f)
|
||||
{
|
||||
SetHealth(currentHealth - amount);
|
||||
if (currentHealth <= 0f && !wasDead && attacker != null)
|
||||
{
|
||||
OnUnitKilled?.Invoke(gameObject, attacker);
|
||||
}
|
||||
}
|
||||
|
||||
if (showDamageNumbers && originalDamage > 0f && !wasDead)
|
||||
|
||||
Reference in new issue
Block a user