Example #1
0
 public Game1()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     soundManager = SoundManager.getInstance();
     Components.Add(new InputManager(this));
     Components.Add(new GameStateManager(this));
 }
Example #2
0
 /// <summary>
 /// return only the current working instance of the class
 /// </summary>
 public static SoundManager getInstance()
 {
     if (soundManager != null)
     {
         return soundManager;
     }
     else
     {
         soundManager = new SoundManager();
         return soundManager;
     }
 }