protected override void LoadContent() { LoadTMXMaps(Content);//Loading all the TMX maps m_spriteBatch = new SpriteBatch(GraphicsDevice); //Debugging tools, showing FPS and other relevant information. Press X while debugging to enable #region PerformanceTool //m_performanceTool = new PerformanceUtility.PerformanceUtility(m_graphics, this); //m_performanceTool.LoadContent(Content, m_spriteBatch); #endregion //Initializing the games main MVC classes m_gameModel = new Model.GameModel(m_TMXMaps); m_inputHandler = new View.InputHandler(); m_gameView = new View.GameView(m_gameModel, m_inputHandler, m_spriteBatch, GraphicsDevice); m_gameController = new GameController(m_gameModel, m_gameView); m_gameView.LoadContent(Content); }
//Konstruktor public GameController(GraphicsDevice a_graphicsDevice, SpriteBatch a_spriteBatch, Model.GameModel a_gameModel, View.AnimationSystem a_animationSystem, View.InputHandler a_inputHandler, View.SoundHandler a_soundHandler) { m_gameModel = a_gameModel; m_gameView = new View.GameView(a_graphicsDevice, a_spriteBatch, m_gameModel, a_animationSystem, a_inputHandler, a_soundHandler); }
//Constructor public GameController(Model.GameModel a_gameModel, View.GameView a_gameView) { this.m_gameModel = a_gameModel; this.m_gameView = a_gameView; this.m_player = a_gameModel.Player; }
public void OnClose(View.GameView view) { view.PlayerDeadEvent -= OnPlayerDead; _view = null; }
public void OnOpen(View.GameView view) { view.PlayerDeadEvent += OnPlayerDead; _view = view; }
/// <summary> /// Cinstructor /// </summary> /// <param name="graphicsDevice">GraphickDevice 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 GameController(GraphicsDevice graphicsDevice, SpriteBatch spriteBatch, Model.GameModel gameModel, View.AnimationSystem animationSystem, View.InputHandler inputHandler, View.SoundHandler soundHandler) { this._gameModel = gameModel; this._gameView = new View.GameView(graphicsDevice, spriteBatch, _gameModel, animationSystem, inputHandler, soundHandler); }