//Konstruktor; laddar gränssnitt & bilder public ScreenView(SpriteBatch a_spriteBatch, View.AnimationSystem a_animationSystem, View.InputHandler a_inputHandler, View.SoundHandler a_soundHandler) { this.m_spriteBatch = a_spriteBatch; this.m_animationSys = a_animationSystem; this.m_inputHandler = a_inputHandler; this.m_soundHandler = a_soundHandler; }
/// <summary> /// Constructor /// </summary> /// <param name="spriteBatch">SpriteBatch instance</param> /// <param name="player">Player object</param> /// <param name="inputHandler">InputHandler instance</param> /// <param name="camera">Camera instance</param> public WorldMap(SpriteBatch spriteBatch, Model.Player player, InputHandler inputHandler, Camera camera) { this._player = player; this._spriteBatch = spriteBatch; this._inputHandler = inputHandler; this._camera = camera; }
/// <summary> /// Constructor /// </summary> /// <param name="spriteBatch">SpriteBatch instance</param> /// <param name="gameModel">Game model instance</param> /// <param name="camera">Camera instance</param> /// <param name="inputHandler">InputHandler instance</param> public Dialog(SpriteBatch spriteBatch, Model.GameModel gameModel, Camera camera, View.InputHandler inputHandler) { this._spriteBatch = spriteBatch; this._dialogueList = new List <Dialogue>(); this._questSystem = gameModel.QuestSystem; this._camera = camera; this._inputHandler = inputHandler; }
public Conversation(SpriteBatch a_spriteBatch, Model.GameModel a_gameModel, Camera a_camera, View.InputHandler a_inputHandler) { this.m_spriteBatch = a_spriteBatch; this.m_dialogueList = new List <Dialogue>(); this.m_questSystem = a_gameModel.m_questSystem; this.m_camera = a_camera; this.m_inputHandler = a_inputHandler; }
/// <summary> /// Constructor /// </summary> /// <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 ScreenView(SpriteBatch spriteBatch, View.AnimationSystem animationSystem, View.InputHandler inputHandler, View.SoundHandler soundHandler) { this._spriteBatch = spriteBatch; this._animationSys = animationSystem; this._inputHandler = inputHandler; this._soundHandler = soundHandler; this._screenContent = new Content(); this._stopWatch = new Stopwatch(); this.FullScreen = false; }
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); }
/// <summary> /// Constructor /// </summary> /// <param name="gameModel">GameModel instance</param> /// <param name="spriteBatch">SpriteBatch instance</param> /// <param name="camera">Camera instance</param> /// <param name="inputHandler">InputHandler instance</param> /// <param name="animationSystem">AnimationSystem instance</param> /// <param name="dialog">Dialog instance</param> public UnitView(Model.GameModel gameModel, SpriteBatch spriteBatch, Camera camera, InputHandler inputHandler, AnimationSystem animationSystem, View.Dialog dialog) { this._player = gameModel.PlayerSystem.Player; this._enemies = gameModel.EnemySystem.Enemies; this._deadEnemies = gameModel.EnemySystem.SpawnList; this._nonPlayerCharacters = gameModel.NpcSystem.NonPlayerCharacters; this._questSystem = gameModel.QuestSystem; this._camera = camera; this._spriteBatch = spriteBatch; this._inputHandler = inputHandler; this._animationSystem = animationSystem; this._conversation = dialog; }
public UnitView(Model.GameModel a_gameModel, SpriteBatch a_spriteBatch, Camera a_camera, InputHandler a_inputHandler, AnimationSystem a_animationSystem, View.Conversation a_conversation) { this.m_player = a_gameModel.m_playerSystem.m_player; this.m_enemies = a_gameModel.m_enemySystem.m_enemies; this.m_deadEnemies = a_gameModel.m_enemySystem.m_spawnList; this.m_friends = a_gameModel.m_friendSystem.m_friends; this.m_questSystem = a_gameModel.m_questSystem; this.m_camera = a_camera; this.m_spriteBatch = a_spriteBatch; this.m_inputHandler = a_inputHandler; this.m_animationSystem = a_animationSystem; this.m_conversation = a_conversation; }
public UIView(SpriteBatch a_spriteBatch, Camera a_camera, InputHandler a_inputHandler, Model.GameModel a_gameModel, Conversation a_conversation) { this.m_spriteBatch = a_spriteBatch; this.m_keyPositions = new Vector2[7]; this.m_camera = a_camera; this.m_inputHandler = a_inputHandler; this.m_activeSpells = a_gameModel.m_playerSystem.m_spellSystem.ActiveSpells; this.m_player = a_gameModel.m_playerSystem.m_player; this.m_questSystem = a_gameModel.m_questSystem; this.m_worldItems = a_gameModel.m_itemSystem.m_items; this.m_currentMap = a_gameModel.m_level.CurrentMap(); this.m_rightClickWatch = new Stopwatch(); this.m_conversation = a_conversation; }
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); }
/// <summary> /// Constructor /// </summary> /// <param name="spriteBatch">Instance of SpriteBatch</param> /// <param name="camera">Instance of Camera</param> /// <param name="inputHandler">Instance of InputHandler</param> /// <param name="gameModel">Instance of GameModel</param> /// <param name="dialog">Instance of Dialog</param> public UIView(SpriteBatch spriteBatch, Camera camera, InputHandler inputHandler, Model.GameModel gameModel, Dialog dialog) { this._spriteBatch = spriteBatch; this._player = gameModel.PlayerSystem.Player; this._worldItems = gameModel.ItemSystem._items; this._currentMap = gameModel.Level.CurrentMap(); this._activeSpells = gameModel.PlayerSystem.SpellSystem.ActiveSpells; this._rightClickWatch = new Stopwatch(); this._dialog = dialog; this._camera = camera; this._inputHandler = inputHandler; this._questSystem = gameModel.QuestSystem; this._common = new UI.Common(_spriteBatch); this._avatar = new UI.Avatar(_spriteBatch, _player); this._worldMap = new UI.WorldMap(_spriteBatch, _player, _inputHandler, _camera); this._actionBar = new UI.ActionBar(_spriteBatch, _activeSpells, _player, _questSystem, _camera); }
protected override void LoadContent() { m_spriteBatch = new SpriteBatch(GraphicsDevice); m_gameModel = new Model.GameModel(Content); //Klasser som medskickas till samtliga controller-klasser m_inputHandler = new View.InputHandler(); m_animationSystem = new View.AnimationSystem(m_spriteBatch); m_soundHandler = new View.SoundHandler(m_inputHandler); m_soundHandler.LoadContent(Content); //Controllers m_screenController = new ScreenController(m_gameModel, m_spriteBatch, m_animationSystem, m_inputHandler, m_soundHandler); m_gameController = new GameController(GraphicsDevice, m_spriteBatch, m_gameModel, m_animationSystem, m_inputHandler, m_soundHandler); m_gameController.LoadContent(Content); m_screenController.LoadScreenContent(Content); //Initsierar renderingsobjekt för TMX filer(map-filer) Map.InitObjectDrawing(GraphicsDevice); }
/// <summary> /// Loading game engine, controller and view. /// Loading all needed class instances. /// </summary> protected override void LoadContent() { _spriteBatch = new SpriteBatch(GraphicsDevice); _performanceTool = new PerformanceUtility.PerformanceUtility(_graphics, this); _performanceTool.LoadContent(Content, _spriteBatch); _gameModel = new Model.GameModel(Content); //Classes needed for all controller classes (GameController and ScreenController) _inputHandler = new View.InputHandler(); _animationSystem = new View.AnimationSystem(_spriteBatch); _soundHandler = new View.SoundHandler(_inputHandler); _soundHandler.LoadContent(Content); //Controllers _screenController = new ScreenController(_gameModel, _spriteBatch, _animationSystem, _inputHandler, _soundHandler); _gameController = new GameController(GraphicsDevice, _spriteBatch, _gameModel, _animationSystem, _inputHandler, _soundHandler); _gameController.LoadContent(Content); _screenController.LoadScreenContent(Content); //Initializing renderingobject for TMX files (map-files). Map.InitObjectDrawing(GraphicsDevice); }
/// <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); }
/// <summary> /// Constructor /// </summary> /// <param name="inputHandler">Instance of InputHandler</param> public SoundHandler(View.InputHandler inputHandler) { this._inputHandler = inputHandler; }
public ScreenController(Model.GameModel a_gameModel, SpriteBatch a_spriteBatch, View.AnimationSystem a_animationSystem, View.InputHandler a_inputHandler, View.SoundHandler a_soundHandler) { this.m_gameModel = a_gameModel; this.m_spriteBatch = a_spriteBatch; this.m_screenView = new View.ScreenView(m_spriteBatch, a_animationSystem, a_inputHandler, a_soundHandler); }
//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); }
public SoundHandler(View.InputHandler a_inputHandler) { this.m_inputHandler = a_inputHandler; }