Example #1
0
 /// <summary>
 /// Initialzes the Game.
 /// </summary>
 /// <param name="sceneManager">The Mogre SceneManager.</param>
 /// <param name="camera">The game CameraMan for the MouseControl.</param>
 /// <param name="mWindow">The RednerWindow for sending the width and height of the window.</param>
 /// <param name="mouse">The Mogre Mouse for GUI.</param>
 /// <param name="keyboard">The Mogre Keyboard for GUI.</param>
 /// <returns>Returns initializes Game singleton instance.</returns>
 private Game(SceneManager sceneManager, CameraMan camera, RenderWindow mWindow, Mouse mouse, Keyboard keyboard)
 {
     sceneMgr = sceneManager;
     gameObjectMgr = GameObjectManager.GetInstance();
     gameGUI = new MyGUI((int)mWindow.Width, (int)mWindow.Height, mouse, keyboard);
     mouseControl = MouseControl.GetInstance(camera, (int)mWindow.Width, (int)mWindow.Height);
     paused = true;
     soundPlayer = new SoundPlayer(mWindow);
     mission = new Mission();
 }
 /// <summary>
 /// Returns the singleton instance of the GameObjectManager (if is the instance null, so initializes).
 /// </summary>
 /// <returns>Returning the singleton instance.</returns>
 public static GameObjectManager GetInstance()
 {
     if (instance == null) {
         instance = new GameObjectManager();
     }
     return instance;
 }