(client)feat:视野范围检测,
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Data;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AI
|
||||
@ -15,5 +16,10 @@ namespace AI
|
||||
{
|
||||
return entity.PlayerControlled;
|
||||
}
|
||||
|
||||
public static bool HasEnemyInSight(Entity.Entity entity)
|
||||
{
|
||||
return entity.visionRangeDetector.GetNearestNEntitiesByRelation(1, Relation.Hostile).Count > 0;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user