#region File Description
//-----------------------------------------------------------------------------
// WorldEntry.cs
//
// Microsoft XNA Community Game Platform
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
#endregion
#region Using Statements
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
#endregion
namespace RolePlayingGameData
{
///
/// A description of a piece of content, including the name of the map it's on.
///
public class WorldEntry : MapEntry where T : ContentObject
{
///
/// The name of the map where the content is added.
///
private string mapContentName;
///
/// The name of the map where the content is added.
///
public string MapContentName
{
get { return mapContentName; }
set { mapContentName = value; }
}
#region Content Type Reader
///
/// Reads a WorldEntry object from the content pipeline.
///
public class WorldEntryReader : ContentTypeReader>
{
///
/// Reads a WorldEntry object from the content pipeline.
///
protected override WorldEntry Read(ContentReader input,
WorldEntry existingInstance)
{
WorldEntry desc = existingInstance;
if (desc == null)
{
desc = new WorldEntry();
}
input.ReadRawObject>(desc as MapEntry);
desc.MapContentName = input.ReadString();
return desc;
}
}
#endregion
}
}