Update/rendering logic separation (cherrypicked from commits 9ca3b24, bddcc36 & 9511bae)

This commit is contained in:
Regalis
2016-10-05 20:35:18 +03:00
parent 65006c5da1
commit 54f3d09af4
9 changed files with 395 additions and 323 deletions
+8 -2
View File
@@ -154,6 +154,14 @@ namespace Barotrauma
}
GameMain.World.Step((float)deltaTime);
if (!PlayerInput.LeftButtonHeld())
{
Inventory.draggingSlot = null;
Inventory.draggingItem = null;
}
}
public override void Draw(double deltaTime, GraphicsDevice graphics, SpriteBatch spriteBatch)
@@ -188,8 +196,6 @@ namespace Barotrauma
GUI.Draw((float)deltaTime, spriteBatch, cam);
if (!PlayerInput.LeftButtonHeld()) Inventory.draggingItem = null;
spriteBatch.End();
}
+6 -1
View File
@@ -355,7 +355,12 @@ namespace Barotrauma
mapZoom += PlayerInput.ScrollWheelSpeed / 1000.0f;
mapZoom = MathHelper.Clamp(mapZoom, 1.0f, 4.0f);
//shiftPanel.Update((float)deltaTime);
GameMain.GameSession.Map.Update((float)deltaTime, new Rectangle(
bottomPanel[selectedRightPanel].Rect.X + 20,
bottomPanel[selectedRightPanel].Rect.Y + 20,
bottomPanel[selectedRightPanel].Rect.Width - 310,
bottomPanel[selectedRightPanel].Rect.Height - 40), mapZoom);
}
public override void Draw(double deltaTime, GraphicsDevice graphics, SpriteBatch spriteBatch)