axiosengine/axios/Engine/Gleed2D/Item.cs
Nathan Adams 3c0c5a4ded Adding support for ability to
override functionality of automated Gleed2D level loading
        by adding functions to AxiosGameScreen to override

--HG--
branch : customgleed2dhandling
2012-05-18 21:15:51 -05:00

62 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.Gleed2D
{
[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(AxiosGameScreen gameScreen, ref Dictionary<string, Texture2D> cache)
{
}
public virtual void draw(SpriteBatch sb)
{
}
}
}