(client)feat:视野范围检测,

This commit is contained in:
m0_75251201
2025-08-25 18:24:12 +08:00
parent 797cf69f75
commit d8a3daaca8
28 changed files with 1340 additions and 519 deletions

View File

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