axiosengine/axios/Engine/Glee2D/Item.cs

61 lines
1.6 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using FarseerPhysics.Dynamics;
namespace Axios.Engine.Glee2D
{
[XmlInclude(typeof(TextureItem))]
[XmlInclude(typeof(RectangleItem))]
[XmlInclude(typeof(CircleItem))]
[XmlInclude(typeof(PathItem))]
public partial class Item
{
/// <summary>
/// The name of this item.
/// </summary>
[XmlAttribute()]
public String Name;
/// <summary>
/// Should this item be visible?
/// </summary>
[XmlAttribute()]
public bool Visible;
/// <summary>
/// The item's position in world space.
/// </summary>
public Vector2 Position;
/// <summary>
/// A Dictionary containing any user-defined Properties.
/// </summary>
public SerializableDictionary CustomProperties;
public Item()
{
CustomProperties = new SerializableDictionary();
}
/// <summary>
/// Called by Level.FromFile(filename) on each Item after the deserialization process.
/// Should be overriden and can be used to load anything needed by the Item (e.g. a texture).
/// </summary>
public virtual void load(ContentManager cm, World world)
{
}
public virtual void draw(SpriteBatch sb)
{
}
}
}