mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-20 05:27:13 +08:00
Co-authored-by: zzdxxz <2079238449@qq.com> Co-committed-by: zzdxxz <2079238449@qq.com>
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);
|
|
}
|
|
}
|
|
} |