(client) feat:添加临时动画组件,添加逃跑逻辑
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
using Data;
|
||||
|
||||
namespace Parsing
|
||||
{
|
||||
public static class ConditionFunctions
|
||||
@ -11,5 +13,21 @@ namespace Parsing
|
||||
{
|
||||
return Managers.EntityManage.Instance.ExistsHostile(entity.currentDimensionId, entity.entityPrefab);
|
||||
}
|
||||
|
||||
public static bool HasWeapon(Entity.Entity entity)
|
||||
{
|
||||
return entity.GetCurrentWeapon() != null;
|
||||
}
|
||||
|
||||
public static bool HasRangedWeapon(Entity.Entity entity)
|
||||
{
|
||||
var weapon = entity.GetCurrentWeapon();
|
||||
return weapon is { Type: WeaponType.Ranged };
|
||||
}
|
||||
public static bool HasMeleeWeapon(Entity.Entity entity)
|
||||
{
|
||||
var weapon = entity.GetCurrentWeapon();
|
||||
return weapon is { Type: WeaponType.Melee };
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user