public GameWindow(UserAccount owner,string connStr, IGameGUI gameGUI, WCFConnectionFactory connFactory) { this.owner = owner; this.gameGUI = gameGUI; playfields = new List<Playfield>(); this.connFactory = connFactory; this.game = connFactory.connectToGame(connStr, this); game.subscribe(owner); }
/// <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 GameGUI.GameGUI((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> /// 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(); }