Co-authored-by: zzdxxz <2079238449@qq.com> Co-committed-by: zzdxxz <2079238449@qq.com>
25 lines
951 B
C#
25 lines
951 B
C#
using System;
|
|
|
|
namespace Entity
|
|
{
|
|
public class EntityHitEventArgs : EventArgs
|
|
{
|
|
public Entity AttackedEntity { get; } // 被攻击的实体
|
|
public Entity AttackerEntity { get; } // 攻击者
|
|
public int DamageDealt { get; } // 这次攻击造成的实际伤害
|
|
public float CurrentHealth { get; } // 攻击后的当前生命值
|
|
public float MaxHealth { get; } // 最大生命值
|
|
public bool WasFatal { get; } // 这次攻击是否致命(导致死亡)
|
|
|
|
public EntityHitEventArgs(Entity attacked, Entity attacker, int damage, float currentHealth, float maxHealth, bool wasFatal)
|
|
{
|
|
AttackedEntity = attacked;
|
|
AttackerEntity = attacker;
|
|
DamageDealt = damage;
|
|
CurrentHealth = currentHealth;
|
|
MaxHealth = maxHealth;
|
|
WasFatal = wasFatal;
|
|
}
|
|
}
|
|
|
|
} |