(client) feat:实现掉落物,UI显示,维度
This commit is contained in:
25
Client/Assets/Scripts/Entity/EntityHitEventArgs.cs
Normal file
25
Client/Assets/Scripts/Entity/EntityHitEventArgs.cs
Normal file
@ -0,0 +1,25 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user