#region File Description //----------------------------------------------------------------------------- // NpcScreen.cs // // Microsoft XNA Community Game Platform // Copyright (C) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- #endregion #region Using Statements using System; using System.Collections.Generic; using System.Text; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Content; using RolePlayingGameData; #endregion namespace RolePlaying { /// /// Display of conversation dialog between the player and the npc /// abstract class NpcScreen : DialogueScreen where T : Character { protected MapEntry mapEntry = null; protected Character character = null; #region Initialization /// /// Create a new NpcScreen object. /// /// public NpcScreen(MapEntry mapEntry) : base() { if (mapEntry == null) { throw new ArgumentNullException("mapEntry"); } this.mapEntry = mapEntry; this.character = mapEntry.Content as Character; if (this.character == null) { throw new ArgumentNullException( "NpcScreen requires a MapEntry with a character."); } TitleText = character.Name; } #endregion } }