修复ai通知其它ai时不会判断阵营是否相同的问题

This commit is contained in:
小李xl 2024-04-08 15:39:10 +08:00
parent e115d5863c
commit 3a7fb7d3b3

View File

@ -144,7 +144,7 @@ public partial class World : CanvasModulate, ICoroutine
{ {
foreach (var role in Role_InstanceList) foreach (var role in Role_InstanceList)
{ {
if (role != self && !role.IsDestroyed && role.AffiliationArea == self.AffiliationArea && role is AiRole enemy) if (role != self && !role.IsDestroyed && role.AffiliationArea == self.AffiliationArea && role is AiRole enemy && !self.IsEnemy(enemy))
{ {
//将未发现目标的敌人状态置为惊讶状态 //将未发现目标的敌人状态置为惊讶状态
var controller = enemy.StateController; var controller = enemy.StateController;