2012-05-08 03:20:22 +00:00
|
|
|
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;
|
|
|
|
|
2012-05-12 22:54:30 +00:00
|
|
|
namespace Axios.Engine.Gleed2D
|
2012-05-08 03:20:22 +00:00
|
|
|
{
|
|
|
|
[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>
|
2012-05-12 22:45:03 +00:00
|
|
|
public virtual void load(ContentManager cm, World world, ref Dictionary<string, Texture2D> cache)
|
2012-05-08 03:20:22 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public virtual void draw(SpriteBatch sb)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|