#region File Description //----------------------------------------------------------------------------- // QuestNpc.cs // // Microsoft XNA Community Game Platform // Copyright (C) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- #endregion #region Using Statements using System; using Microsoft.Xna.Framework.Content; #endregion namespace RolePlayingGameData { /// /// An NPC that does not fight and does not join the party. /// public class QuestNpc : Character { #region Dialogue Data /// /// The dialogue that the Npc says when it is greeted in the world. /// private string introductionDialogue; /// /// The dialogue that the Npc says when it is greeted in the world. /// public string IntroductionDialogue { get { return introductionDialogue; } set { introductionDialogue = value; } } #endregion #region Content Type Reader /// /// Read a QuestNpc object from the content pipeline. /// public class QuestNpcReader : ContentTypeReader { protected override QuestNpc Read(ContentReader input, QuestNpc existingInstance) { QuestNpc questNpc = existingInstance; if (questNpc == null) { questNpc = new QuestNpc(); } input.ReadRawObject(questNpc as Character); questNpc.IntroductionDialogue = input.ReadString(); return questNpc; } } #endregion } }