21 lines
495 B
C#
21 lines
495 B
C#
|
using System;
|
||
|
using Data;
|
||
|
using Managers;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace AI
|
||
|
{
|
||
|
public static class ConditionFunctions
|
||
|
{
|
||
|
public static bool EntityHealth(Entity.Entity entity, int minHealth)
|
||
|
{
|
||
|
return entity.attributes.health >= minHealth;
|
||
|
}
|
||
|
|
||
|
|
||
|
public static bool HasEnemyInSight(Entity.Entity entity)
|
||
|
{
|
||
|
return Managers.EntityManage.Instance.ExistsHostile(entity.currentDimensionId,entity.entityPrefab);
|
||
|
}
|
||
|
}
|
||
|
}
|