axiosengine/axios/Engine/Gleed2D/CircleItem.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

39 lines
1022 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FarseerPhysics.Dynamics;
using FarseerPhysics.Common;
using FarseerPhysics.SamplesFramework;
using FarseerPhysics.Factories;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
namespace Axios.Engine.Gleed2D
{
public partial class CircleItem : Item
{
public float Radius;
public Color FillColor;
Body _body;
public CircleItem()
{
}
public override void load(AxiosGameScreen gameScreen, ref Dictionary<string, Texture2D> cache)
{
base.load(gameScreen, ref cache);
if (gameScreen.LoadCircleItem(this))
{
_body = BodyFactory.CreateCircle(gameScreen.World, Radius, 1f);
_body.Position = ConvertUnits.ToSimUnits(Position);
_body.UserData = this;
}
}
}
}