34 lines
1.6 KiB
C#
34 lines
1.6 KiB
C#
using Microsoft.Xna.Framework.Audio;
|
|
using Microsoft.Xna.Framework.Content;
|
|
|
|
namespace SemiColinGames {
|
|
public static class SoundEffects {
|
|
|
|
public static SoundEffect IntroMusic;
|
|
public static SoundEffect[] SwordSwings = new SoundEffect[14];
|
|
|
|
// Returns true if all SoundEffects were successfully loaded.
|
|
public static void Load(ContentManager content) {
|
|
try {
|
|
IntroMusic = content.Load<SoundEffect>("music/playonloop/smash_bros_short");
|
|
SwordSwings[0] = content.Load<SoundEffect>("sfx/zs_whoosh_30568");
|
|
SwordSwings[1] = content.Load<SoundEffect>("sfx/zs_whoosh_30569");
|
|
SwordSwings[2] = content.Load<SoundEffect>("sfx/zs_whoosh_30570");
|
|
SwordSwings[3] = content.Load<SoundEffect>("sfx/zs_whoosh_30571");
|
|
SwordSwings[4] = content.Load<SoundEffect>("sfx/zs_whoosh_30572");
|
|
SwordSwings[5] = content.Load<SoundEffect>("sfx/zs_whoosh_30573");
|
|
SwordSwings[6] = content.Load<SoundEffect>("sfx/zs_whoosh_30574");
|
|
SwordSwings[7] = content.Load<SoundEffect>("sfx/zs_whoosh_30575");
|
|
SwordSwings[8] = content.Load<SoundEffect>("sfx/zs_whoosh_30576");
|
|
SwordSwings[9] = content.Load<SoundEffect>("sfx/zs_whoosh_30577");
|
|
SwordSwings[10] = content.Load<SoundEffect>("sfx/zs_whoosh_30578");
|
|
SwordSwings[11] = content.Load<SoundEffect>("sfx/zs_whoosh_30579");
|
|
SwordSwings[12] = content.Load<SoundEffect>("sfx/zs_whoosh_30580");
|
|
SwordSwings[13] = content.Load<SoundEffect>("sfx/zs_whoosh_30581");
|
|
} catch (NoAudioHardwareException) {
|
|
Debug.WriteLine("SoundEffects.Load(): NoAudioHardwareException");
|
|
}
|
|
}
|
|
}
|
|
}
|