private static void sheep_PlaySound(IntPtr context) { bool isInWaitSection = SheepMachine.IsInWaitSection(context); string sound = SheepMachine.PopStringOffStack(context); Sound.AudioEngine.SoundEffect s = SceneManager.SceneContentManager.Load <Sound.AudioEngine.SoundEffect>(sound); Sound.PlayingSound ps = Sound.SoundManager.PlaySound2DToChannel(s, Sound.SoundTrackChannel.SFX); }
public MomResource(string name, System.IO.Stream stream, Resource.ResourceManager content) : base(name, stream) { if (content == null) { throw new ArgumentNullException("content"); } _content = content; foreach (AnimationResourceSection section in Sections) { if (section.SectionName.Equals("ACTIONS", StringComparison.OrdinalIgnoreCase)) { _actionSection = section; } else if (section.SectionName.Equals("MVISIBILITY", StringComparison.OrdinalIgnoreCase)) { _modelVisibilitySection = section; } else if (section.SectionName.Equals("MTEXTURES", StringComparison.OrdinalIgnoreCase)) { _modelTexturesSection = section; } else if (section.SectionName.Equals("SOUNDS", StringComparison.OrdinalIgnoreCase)) { _soundSection = section; // preload the sounds foreach (AnimationResourceSectionLine line in section.Lines) { string soundName = line.Params[0].StringValue; Sound.AudioEngine.SoundEffect sound = content.Load <Sound.AudioEngine.SoundEffect>(soundName); _sounds.Add(sound); } } else if (section.SectionName.Equals("GK3", StringComparison.OrdinalIgnoreCase)) { _gk3Section = section; } } }