예제 #1
0
        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()) || info.Player.IsWounded())
                {
                    enemyPlayersInRange.RemoveAt(index);
                    --index;
                }
                else
                {
                    EnemyPlayersHearingSensor.TickFootstepHearingTest(npc, ref info);
                }
            }
        }
예제 #2
0
        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() || item.Player.IsWounded())
                {
                    enemyPlayersInRange.RemoveAt(i);
                    i--;
                }
                else
                {
                    EnemyPlayersHearingSensor.TickFootstepHearingTest(npc, ref item);
                }
            }
        }
예제 #3
0
 public void Tick(IHTNAgent npc, float deltaTime, float time)
 {
     EnemyPlayersHearingSensor.TickStatic(npc);
 }