using Microsoft.Xna.Framework;
namespace Omegasis.SaveAnywhere.Framework.Models
{
/// Represents saved data for an NPC.
public class CharacterData
{
/*********
** Accessors
*********/
/// The character type.
public CharacterType Type { get; set; }
/// The character name.
public string Name { get; set; }
/// The map name.
public string Map { get; set; }
/// The X position.
public int X { get; set; }
/// The Y position.
public int Y { get; set; }
/// The direction the character is facing.
public int FacingDirection { get; set; }
/*********
** Public methods
*********/
/// Construct an instance.
/// This default constructor is needed by Json.NET.
public CharacterData() { }
/// Construct an instance.
/// The character type.
/// The character name.
/// The map name.
/// The X position.
/// The Y position.
/// The direction the character is facing.
public CharacterData(CharacterType type, string name, string map, int x, int y, int facingDirection)
{
this.Type = type;
this.Name = name;
this.Map = map;
this.X = x;
this.Y = y;
this.FacingDirection = facingDirection;
}
/// Construct an instance.
/// The character type.
/// The character name.
/// The map name.
/// The tile position.
/// The direction the character is facing.
public CharacterData(CharacterType type, string name, string map, Point tile, int facingDirection)
: this(type, name, map, tile.X, tile.Y, facingDirection) { }
}
}