public static void TickStatic(IHTNAgent npc) { npc.AiDomain.NpcContext.EnemyPlayersAudible.Clear(); List <NpcPlayerInfo> enemyPlayersInRange = npc.AiDomain.NpcContext.EnemyPlayersInRange; for (int i = 0; i < enemyPlayersInRange.Count; i++) { NpcPlayerInfo item = enemyPlayersInRange[i]; if (item.Player == null || item.Player.transform == null || item.Player.IsDestroyed || item.Player.IsDead()) { enemyPlayersInRange.RemoveAt(i); i--; } else { BearEnemyPlayersHearingSensor.TickFootstepHearingTest(npc, ref item); } } }
public static void TickStatic(IHTNAgent npc) { npc.AiDomain.NpcContext.EnemyPlayersAudible.Clear(); List <NpcPlayerInfo> enemyPlayersInRange = npc.AiDomain.NpcContext.EnemyPlayersInRange; for (int index = 0; index < enemyPlayersInRange.Count; ++index) { NpcPlayerInfo info = enemyPlayersInRange[index]; if (Object.op_Equality((Object)info.Player, (Object)null) || Object.op_Equality((Object)((Component)info.Player).get_transform(), (Object)null) || (info.Player.IsDestroyed || info.Player.IsDead())) { enemyPlayersInRange.RemoveAt(index); --index; } else { BearEnemyPlayersHearingSensor.TickFootstepHearingTest(npc, ref info); } } }
public void Tick(IHTNAgent npc, float deltaTime, float time) { BearEnemyPlayersHearingSensor.TickStatic(npc); }