public GameView(GraphicsDevice a_graphicsDevice, SpriteBatch a_spriteBatch, Model.GameModel a_gameModel, View.AnimationSystem a_animationSystem, View.InputHandler a_inputHandler, View.SoundHandler a_soundHandler) { this.m_gameModel = a_gameModel; this.m_camera = new Camera(a_graphicsDevice, a_gameModel); this.m_spriteBatch = a_spriteBatch; this.m_soundHandler = a_soundHandler; this.m_inputHandler = a_inputHandler; //Hantering av samtliga anv-inputs this.m_animationSystem = a_animationSystem; //System för sprite-animationer this.m_conversation = new Conversation(m_spriteBatch, m_gameModel, m_camera, m_inputHandler); //Behandlar/ritar dialogtexter this.m_UIView = new UIView(m_spriteBatch, m_camera, m_inputHandler, a_gameModel, m_conversation); //Utritning av user-interface this.m_unitView = new UnitView(m_gameModel, m_spriteBatch, m_camera, m_inputHandler, m_animationSystem, m_conversation); //Utritning av samtliga units }
/// <summary> /// Constructor /// </summary> /// <param name="graphicsDevice">GraphicsDevice instance</param> /// <param name="spriteBatch">SpriteBatch instance</param> /// <param name="gameModel">GameModel instance</param> /// <param name="animationSystem">AnimationSystem instance</param> /// <param name="inputHandler">InputHandler instance</param> /// <param name="soundHandler">SoundHandler instance</param> public GameView(GraphicsDevice graphicsDevice, SpriteBatch spriteBatch, Model.GameModel gameModel, View.AnimationSystem animationSystem, View.InputHandler inputHandler, View.SoundHandler soundHandler) { this._gameModel = gameModel; this._camera = new Camera(graphicsDevice, gameModel); this._spriteBatch = spriteBatch; this._soundHandler = soundHandler; this._inputHandler = inputHandler; this._animationSystem = animationSystem; this._conversation = new Dialog(spriteBatch, _gameModel, _camera, _inputHandler); this._UIView = new UIView(spriteBatch, _camera, _inputHandler, gameModel, _conversation); this._unitView = new UnitView(_gameModel, spriteBatch, _camera, _inputHandler, _animationSystem, _conversation); }