Exemple #1
0
 public SoundEffect(string file)
 {
     try
     {
         data = GameEngine.QueryComponent<AudioEngine>().CreateSoundEffect(file);
     }
     catch (InvalidOperationException ex)
     {
         throw new InvalidOperationException(
             "A sound effect can only be created if a sound engine ist registered.",
             ex);
     }
 }
Exemple #2
0
 public SoundEffect(string file)
 {
     try
     {
         data = GameEngine.QueryComponent <AudioEngine>().CreateSoundEffect(file);
     }
     catch (InvalidOperationException ex)
     {
         throw new InvalidOperationException(
                   "A sound effect can only be created if a sound engine ist registered.",
                   ex);
     }
 }