public void Activate(uint enemyID, int count, LG_LayerType layer, eLocalZoneIndex zoneIndex, string areaName) { var enemies = UnityEngine.Object.FindObjectsOfType <EnemyAgent>(); int curCount = 0; for (int index = 0; index < enemies.Count && (count == -1 || curCount < count); index++) { var enemy = enemies[index]; var node = enemy.CourseNode; if (node != null && node.LayerType == layer && node.m_zone.LocalIndex == zoneIndex && node.m_area.m_navInfo.Suffix.ToLower() == areaName) { if (enemy.EnemyData.persistentID == enemyID && enemy.AI != null && enemy.Alive) { NM_NoiseData data = new NM_NoiseData() { noiseMaker = null, position = enemy.Position, radiusMin = 0f, radiusMax = 100f, yScale = 1f, node = enemy.CourseNode, type = NM_NoiseType.InstaDetect, includeToNeightbourAreas = true, raycastFirstNode = false }; NoiseManager.MakeNoise(data); curCount++; } } } }
public static LG_Zone GetZone(LG_LayerType layer, eLocalZoneIndex index) { if (Builder.Current.m_currentFloor.TryGetZoneByLocalIndex(layer, index, out var zone)) { return(zone); } return(null); }
public void Activate(LG_LayerType layer, eLocalZoneIndex zoneIndex, eLocalZoneIndex buildFromIndex) { GameInfo.UnlockSecurityDoor(layer, zoneIndex, buildFromIndex); }
public static bool TryGetZone(LG_LayerType layer, eLocalZoneIndex index, out LG_Zone zone) { return(Builder.Current.m_currentFloor.TryGetZoneByLocalIndex(layer, index, out zone)); }