axiosengine/axios/Engine/Extensions/RectangleItemProperties.cs
Nathan Adams 01748bc5f8 Fixing axios log flag detection
Adding dispose methods to AxiosFile objects
Adding extended log to AxiosLog
Fixing issue in CommandConsole where the first line would not be displayed
Adding commands to commandconsole
2015-01-02 20:14:38 -06:00

28 lines
779 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Gleed2D.InGame;
using FarseerPhysics.SamplesFramework;
namespace Axios.Engine.Extensions
{
public static class AxiosExtensions_RectangleItemProperties
{
public static Vector2 getSimPosition(this RectangleItemProperties prop)
{
Vector2 pos = ConvertUnits.ToSimUnits(prop.Position);
pos.X += ConvertUnits.ToSimUnits(prop.Width / 2);
pos.Y += ConvertUnits.ToSimUnits(prop.Height / 2);
return pos;
}
public static Vector2 getCenter(this RectangleItemProperties prop)
{
return prop.getSimPosition() / ConvertUnits.ToSimUnits(2);
}
}
}