示例#1
0
		private static void PlaySound(GameSounds soundName)
		{
			var sound = ContentLoader.Load<Sound>(soundName.ToString());
			if (sound == null)
				return;
			sound.Play();
			sound.OnStop += instance => PlayXpCollectedSound();
		}
示例#2
0
        private static void PlaySound(GameSounds soundName)
        {
            var sound = ContentLoader.Load <Sound>(soundName.ToString());

            if (sound != null)
            {
                sound.Play();
            }
        }
示例#3
0
        private static void PlayAttackSound(GameSounds attackSoundName)
        {
            var attackSound = ContentLoader.Load <Sound>(attackSoundName.ToString());

            if (attackSound != null)
            {
                attackSound.Play();
            }
        }
示例#4
0
        private static void PlaySound(GameSounds soundName)
        {
            var sound = ContentLoader.Load <Sound>(soundName.ToString());

            if (sound == null)
            {
                return;
            }
            sound.Play();
            sound.OnStop += instance => PlayXpCollectedSound();
        }
示例#5
0
		private static void PlaySound(GameSounds soundName)
		{
			var sound = ContentLoader.Load<Sound>(soundName.ToString());
			if (sound != null)
				sound.Play();
		}
示例#6
0
 public void PlaySound(GameSounds sound, float pitch, float volume)
 {
     _sounds.PlaySound(sound.ToString(), pitch, volume);
 }
示例#7
0
 public void PlaySound(GameSounds sound)
 {
     _sounds.PlaySound(sound.ToString());
 }
		private static void PlayAttackSound(GameSounds attackSoundName)
		{
			var attackSound = ContentLoader.Load<Sound>(attackSoundName.ToString());
			if (attackSound != null)
				attackSound.Play();
		}