#region File Description
//-----------------------------------------------------------------------------
// CharacterLevelingStatistics.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
{
///
/// Information about how to increment statistics with additional character levels.
///
#if !XBOX
[Serializable]
#endif
public struct CharacterLevelingStatistics
{
///
/// The amount that the character's health points will increase.
///
public Int32 HealthPointsIncrease;
///
/// The number of levels between each health point increase.
///
public Int32 LevelsPerHealthPointsIncrease;
///
/// The amount that the character's magic points will increase.
///
public Int32 MagicPointsIncrease;
///
/// The number of levels between each magic point increase.
///
public Int32 LevelsPerMagicPointsIncrease;
///
/// The amount that the character's physical offense will increase.
///
public Int32 PhysicalOffenseIncrease;
///
/// The number of levels between each physical offense increase.
///
public Int32 LevelsPerPhysicalOffenseIncrease;
///
/// The amount that the character's physical defense will increase.
///
public Int32 PhysicalDefenseIncrease;
///
/// The number of levels between each physical defense increase.
///
public Int32 LevelsPerPhysicalDefenseIncrease;
///
/// The amount that the character's magical offense will increase.
///
public Int32 MagicalOffenseIncrease;
///
/// The number of levels between each magical offense increase.
///
public Int32 LevelsPerMagicalOffenseIncrease;
///
/// The amount that the character's magical defense will increase.
///
public Int32 MagicalDefenseIncrease;
///
/// The number of levels between each magical defense increase.
///
public Int32 LevelsPerMagicalDefenseIncrease;
#region Content Type Reader
///
/// Reads a CharacterLevelingStatistics object from the content pipeline.
///
public class CharacterLevelingStatisticsReader :
ContentTypeReader
{
///
/// Reads a CharacterLevelingStatistics object from the content pipeline.
///
protected override CharacterLevelingStatistics Read(ContentReader input,
CharacterLevelingStatistics existingInstance)
{
CharacterLevelingStatistics stats = existingInstance;
stats.HealthPointsIncrease = input.ReadInt32();
stats.MagicPointsIncrease = input.ReadInt32();
stats.PhysicalOffenseIncrease = input.ReadInt32();
stats.PhysicalDefenseIncrease = input.ReadInt32();
stats.MagicalOffenseIncrease = input.ReadInt32();
stats.MagicalDefenseIncrease = input.ReadInt32();
stats.LevelsPerHealthPointsIncrease = input.ReadInt32();
stats.LevelsPerMagicPointsIncrease = input.ReadInt32();
stats.LevelsPerPhysicalOffenseIncrease = input.ReadInt32();
stats.LevelsPerPhysicalDefenseIncrease = input.ReadInt32();
stats.LevelsPerMagicalOffenseIncrease = input.ReadInt32();
stats.LevelsPerMagicalDefenseIncrease = input.ReadInt32();
return stats;
}
}
#endregion
}
}