Esempio n. 1
0
 /// <summary>
 /// Play the specified paused and return the newly created SoundChannel
 /// </summary>
 /// <param name='paused'>
 /// When set to <c>true</c>, the sound is set up, but remains paused.
 /// You can use this to set frequency, panning and volume before playing the sound.
 /// </param>
 /// <param name='channelId'>
 /// When in range 0...31, the selected channel will be used. If it already
 /// contains a playing sound, that sound will be stopped.
 /// When set to -1 (the default), the next free channel will be used.
 /// However, when all channels are in use, Sound.Play will silently fail.
 /// </param>
 public SoundChannel Play( bool paused = false, int channelId = -1 )
 {
     int id = 0;
     FMOD.FMOD.System_PlaySound( _system, channelId, _id, paused, ref id );
     SoundChannel soundChannel = new SoundChannel( id );
     return soundChannel;
 }
Esempio n. 2
0
 public MainMenu(NeonArkanoidGame game)
 {
     _game = game;
     SetBackground();
     SetHeader();
     _buttons = new[]
     {
         new Button(UtilStrings.SpritesMenu + "Start.png", 2, 1500, 207, "Level1"),
         new Button(UtilStrings.SpritesMenu + "credits.png", 2, 1498, 370, "Credits"),
         new Button(UtilStrings.SpritesMenu + "quit.png", 2, 1502, 537, "Exit")
     };
     foreach (var button in _buttons)
     {
         AddChild(button);
     }
     _buttons[0].Selected();
     _selectedSound = new Sound(UtilStrings.SoundsMenu + "sound_selected.wav");
     var music = new Sound(UtilStrings.SoundsMenu + "Menu.ogg", true, true);
     _musicChannel = music.Play();
 }
Esempio n. 3
0
 private void SetSounds()
 {
     _hitPoly = new Sound(UtilStrings.SoundsLevel + "1_tile hit.wav");
     _hitPaddle = new Sound(UtilStrings.SoundsLevel + "1_pedal hit.wav");
     _music = new Sound(UtilStrings.SoundsLevel + "8.wav", true, true);
     _musicChannel = _music.Play();
 }