/// <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; }
/// <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); }