Separated inventory update & rendering logic

This commit is contained in:
Regalis
2016-10-04 23:52:32 +03:00
parent 9ca3b24585
commit bddcc36673
5 changed files with 320 additions and 254 deletions
+8 -2
View File
@@ -152,6 +152,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)
@@ -189,8 +197,6 @@ namespace Barotrauma
GUI.Draw((float)deltaTime, spriteBatch, cam);
if (!PlayerInput.LeftButtonHeld()) Inventory.draggingItem = null;
spriteBatch.End();
}