2025-08-24 17:15:52 +08:00
|
|
|
using System;
|
2025-08-25 18:24:12 +08:00
|
|
|
using Data;
|
2025-08-26 16:00:58 +08:00
|
|
|
using Managers;
|
2025-08-24 17:15:52 +08:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
namespace AI
|
|
|
|
{
|
|
|
|
public static class ConditionFunctions
|
|
|
|
{
|
|
|
|
public static bool EntityHealth(Entity.Entity entity, int minHealth)
|
|
|
|
{
|
|
|
|
return entity.attributes.health >= minHealth;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2025-08-25 18:24:12 +08:00
|
|
|
public static bool HasEnemyInSight(Entity.Entity entity)
|
|
|
|
{
|
2025-08-26 16:00:58 +08:00
|
|
|
return Managers.EntityManage.Instance.ExistsHostile(entity.currentDimensionId,entity.entityPrefab);
|
2025-08-25 18:24:12 +08:00
|
|
|
}
|
2025-08-24 17:15:52 +08:00
|
|
|
}
|
|
|
|
}
|