public static void CacheSounds() { AI.AIID[] array = (AI.AIID[])Enum.GetValues(typeof(AI.AIID)); for (int i = 0; i < array.Length; i++) { AISoundModule.ParseSoundFile(array[i]); } }
private void Awake() { AIManager.s_Instance = this; this.InitFleshHitSounds(); this.InitHumanSoundsParser(); this.InitializeAnimEventsParsers(); this.InitializeAnimatorDataParsers(); this.InitializeGoalParsers(); this.InitializeAIParams(); this.InitializeBloodFXData(); this.InitFootstepsData(); AISoundModule.CacheSounds(); AIManager.s_WalkableAreaMask = 1 << NavMesh.GetAreaFromName("Walkable"); }
public override void Initialize(Being being) { base.Initialize(being); bool flag = false; AISoundModule.s_Status.TryGetValue((int)this.m_AI.m_ID, out flag); if (!flag) { AISoundModule.ParseSoundFile(this.m_AI.m_ID); } if (this.m_AudioSource == null) { this.m_AudioSource = base.gameObject.AddComponent <AudioSource>(); this.m_AudioSource.outputAudioMixerGroup = GreenHellGame.Instance.GetAudioMixerGroup(AudioMixerGroupGame.AI); this.m_AudioSource.spatialBlend = 1f; this.m_AudioSource.rolloffMode = AudioRolloffMode.Linear; this.m_AudioSource.maxDistance = 12f; this.m_AudioSource.priority = 50; } }