+ * - Fixing path placement in Farseer
* Fixing rectangle placement in Farseer + * - Moving base.draw to last in AxiosGameScreen to make sure Farseer debug information is visible
This commit is contained in:
parent
f57659e2e1
commit
33d46b0cd7
@ -76,6 +76,8 @@
|
||||
* - Adding support to load a Gleed2D level from a stream
|
||||
* - Adjusting units for Gleed2D position for Farseer bodies
|
||||
* - Modfying draw method in AxiosGameScreen to draw Gleed2D textures
|
||||
* - Fixing path placement in Farseer
|
||||
* - Moving base.draw to last in AxiosGameScreen to make sure Farseer debug information is visible
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -183,7 +183,7 @@ namespace Axios.Engine
|
||||
|
||||
public override void Draw(GameTime gameTime)
|
||||
{
|
||||
base.Draw(gameTime);
|
||||
|
||||
|
||||
if (Level != null)
|
||||
{
|
||||
@ -191,8 +191,8 @@ namespace Axios.Engine
|
||||
{
|
||||
Vector2 oldcameraposition = camera.Position;
|
||||
camera.Position *= layer.ScrollSpeed;
|
||||
|
||||
ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, camera.matrix);
|
||||
|
||||
ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, Camera.View);
|
||||
layer.draw(ScreenManager.SpriteBatch);
|
||||
ScreenManager.SpriteBatch.End();
|
||||
|
||||
@ -206,7 +206,7 @@ namespace Axios.Engine
|
||||
foreach(AxiosUIObject g in (from x in _uiobjects orderby x.DrawOrder select x))
|
||||
((IDrawableAxiosGameObject)g).Draw(this, gameTime);
|
||||
|
||||
//System.Diagnostics.Debugger.Break();
|
||||
base.Draw(gameTime); //This is placed at the end so that Farseer debug information is visible
|
||||
|
||||
}
|
||||
|
||||
|
@ -30,8 +30,8 @@ namespace Axios.Engine.Gleed2D
|
||||
{
|
||||
base.load(cm, world, ref cache);
|
||||
|
||||
Vertices v = new Vertices(WorldPoints.Length);
|
||||
foreach (Vector2 vec in WorldPoints)
|
||||
Vertices v = new Vertices(LocalPoints.Length);
|
||||
foreach (Vector2 vec in LocalPoints)
|
||||
v.Add(new Vector2(ConvertUnits.ToSimUnits(vec.X), ConvertUnits.ToSimUnits(vec.Y)));
|
||||
|
||||
_body = BodyFactory.CreateLoopShape(world, v);
|
||||
|
@ -28,8 +28,8 @@ namespace Axios.Engine.Gleed2D
|
||||
{
|
||||
base.load(cm, world, ref cache);
|
||||
|
||||
_body = BodyFactory.CreateRectangle(world, Width, Height, 1f);
|
||||
_body.Position = ConvertUnits.ToSimUnits(Position);
|
||||
_body = BodyFactory.CreateRectangle(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