(client) feat:添加临时动画组件,添加逃跑逻辑

This commit is contained in:
m0_75251201
2025-09-06 12:25:55 +08:00
parent f43aeffebf
commit 15cdd2b244
73 changed files with 3420 additions and 6055 deletions

View File

@ -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 };
}
}
}