- Fixing bug where loadrecentangleitem wouldn't be called by Gleed2D library
This commit is contained in:
parent
2ffb70d9fc
commit
859a6c3c9d
@ -87,6 +87,8 @@
|
||||
* - Adding cut extension - [Author: BJD]
|
||||
* - Adding support for custom handling of Gleed2D items
|
||||
* - Changing location of GetTexture to extensions
|
||||
* - Enabling commented log messages
|
||||
* - Fixing bug where loadrecentangleitem wouldn't be called by Gleed2D library
|
||||
*
|
||||
*/
|
||||
#endregion
|
||||
|
@ -27,10 +27,12 @@ namespace Axios.Engine.Gleed2D
|
||||
public override void load(AxiosGameScreen gameScreen, ref Dictionary<string, Texture2D> cache)
|
||||
{
|
||||
base.load(gameScreen, ref cache);
|
||||
|
||||
_body = BodyFactory.CreateRectangle(gameScreen.World, ConvertUnits.ToSimUnits(Width), ConvertUnits.ToSimUnits(Height), 1f);
|
||||
_body.Position = ConvertUnits.ToSimUnits(Position) + new Vector2(ConvertUnits.ToSimUnits(Width)/2, ConvertUnits.ToSimUnits(Height)/2);
|
||||
_body.UserData = this;
|
||||
if (gameScreen.LoadRectangleItem(this))
|
||||
{
|
||||
_body = BodyFactory.CreateRectangle(gameScreen.World, ConvertUnits.ToSimUnits(Width), ConvertUnits.ToSimUnits(Height), 1f);
|
||||
_body.Position = ConvertUnits.ToSimUnits(Position) + new Vector2(ConvertUnits.ToSimUnits(Width) / 2, ConvertUnits.ToSimUnits(Height) / 2);
|
||||
_body.UserData = this;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user