#region File Description //----------------------------------------------------------------------------- // GameStartDescription.cs // // Microsoft XNA Community Game Platform // Copyright (C) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- #endregion #region Using Statements using System; using System.Collections.Generic; using Microsoft.Xna.Framework.Content; #endregion namespace RolePlayingGameData { /// /// The data needed to start a new game. /// public class GameStartDescription { #region Map /// /// The content name of the map for a new game. /// private string mapContentName; /// /// The content name of the map for a new game. /// public string MapContentName { get { return mapContentName; } set { mapContentName = value; } } #endregion #region Party /// /// The content names of the players in the party from the beginning. /// private List playerContentNames = new List(); /// /// The content names of the players in the party from the beginning. /// public List PlayerContentNames { get { return playerContentNames; } set { playerContentNames = value; } } #endregion #region Quest Line /// /// The quest line in action when the game starts. /// /// The first quest will be started before the world is shown. private string questLineContentName; /// /// The quest line in action when the game starts. /// /// The first quest will be started before the world is shown. [ContentSerializer(Optional = true)] public string QuestLineContentName { get { return questLineContentName; } set { questLineContentName = value; } } #endregion #region Content Type Reader /// /// Read a GameStartDescription object from the content pipeline. /// public class GameStartDescriptionReader : ContentTypeReader { protected override GameStartDescription Read(ContentReader input, GameStartDescription existingInstance) { GameStartDescription desc = existingInstance; if (desc == null) { desc = new GameStartDescription(); } desc.MapContentName = input.ReadString(); desc.PlayerContentNames.AddRange(input.ReadObject>()); desc.QuestLineContentName = input.ReadString(); return desc; } } #endregion } }