Debug text tweaking, guiframe for relay component, spears loaded into a harpoon gun don't float in the air, some new names

This commit is contained in:
Regalis
2016-06-07 20:41:32 +03:00
parent bd4292c3e5
commit 14c809b2f2
8 changed files with 193 additions and 27 deletions
+13 -13
View File
@@ -398,27 +398,27 @@ namespace Barotrauma
if (GameMain.DebugDraw)
{
spriteBatch.DrawString(Font,
spriteBatch.DrawString(SmallFont,
"FPS: " + (int)GameMain.FrameCounter.AverageFramesPerSecond,
new Vector2(10, 10), Color.White);
spriteBatch.DrawString(Font,
spriteBatch.DrawString(SmallFont,
"Physics: " + GameMain.World.UpdateTime,
new Vector2(10, 20), Color.White);
spriteBatch.DrawString(SmallFont,
"Bodies: " + GameMain.World.BodyList.Count + " (" + GameMain.World.BodyList.FindAll(b => b.Awake && b.Enabled).Count + " awake)",
new Vector2(10, 30), Color.White);
spriteBatch.DrawString(Font,
"Bodies: " + GameMain.World.BodyList.Count + " (" + GameMain.World.BodyList.FindAll(b => b.Awake && b.Enabled).Count + " awake)",
new Vector2(10, 50), Color.White);
spriteBatch.DrawString(SmallFont,
"Camera pos: " + GameMain.GameScreen.Cam.Position.ToPoint(),
new Vector2(10, 40), Color.White);
spriteBatch.DrawString(Font,
"Camera pos: " + GameMain.GameScreen.Cam.Position,
new Vector2(10, 70), Color.White);
if (Submarine.Loaded!=null)
if (Submarine.Loaded != null)
{
spriteBatch.DrawString(Font,
"Sub pos: " + Submarine.Loaded.Position,
new Vector2(10, 90), Color.White);
spriteBatch.DrawString(SmallFont,
"Sub pos: " + Submarine.Loaded.Position.ToPoint(),
new Vector2(10, 50), Color.White);
}
}
+5 -3
View File
@@ -813,6 +813,9 @@ namespace Barotrauma
if (prefab.sprite != null)
{
float depth = Sprite.Depth;
depth += (ID % 255) * 0.000001f;
if (body == null)
{
if (prefab.ResizeHorizontal || prefab.ResizeVertical)
@@ -821,7 +824,7 @@ namespace Barotrauma
}
else
{
prefab.sprite.Draw(spriteBatch, new Vector2(DrawPosition.X, -DrawPosition.Y), color);
prefab.sprite.Draw(spriteBatch, new Vector2(DrawPosition.X, -DrawPosition.Y), color, 0.0f, 1.0f, SpriteEffects.None, depth);
}
}
@@ -830,7 +833,6 @@ namespace Barotrauma
var holdable = GetComponent<Holdable>();
if (holdable!=null && holdable.Picker !=null)
{
float depth = Sprite.Depth;
if (holdable.Picker.SelectedItems[0]==this)
{
depth = holdable.Picker.AnimController.GetLimb(LimbType.RightHand).sprite.Depth + 0.000001f;
@@ -844,7 +846,7 @@ namespace Barotrauma
}
else
{
body.Draw(spriteBatch, prefab.sprite, color);
body.Draw(spriteBatch, prefab.sprite, color, depth);
}
}
}
+7 -3
View File
@@ -522,9 +522,13 @@ namespace Barotrauma
new Rectangle(drawRect.X, -drawRect.Y, rect.Width, rect.Height),
Color.Red*((100.0f-OxygenPercentage)/400.0f), true);
spriteBatch.DrawString(GUI.Font, "Pressure: " + ((int)pressure - rect.Y).ToString() +
" - Oxygen: " + ((int)OxygenPercentage), new Vector2(drawRect.X + 10, -drawRect.Y + 10), Color.Black);
spriteBatch.DrawString(GUI.Font, volume + " / " + FullVolume, new Vector2(drawRect.X + 10, -drawRect.Y + 30), Color.Black);
if (GameMain.DebugDraw)
{
spriteBatch.DrawString(GUI.SmallFont, "Pressure: " + ((int)pressure - rect.Y).ToString() +
" - Oxygen: " + ((int)OxygenPercentage), new Vector2(drawRect.X + 5, -drawRect.Y + 5), Color.White);
spriteBatch.DrawString(GUI.SmallFont, volume + " / " + FullVolume, new Vector2(drawRect.X + 5, -drawRect.Y + 20), Color.White);
}
if ((isSelected || isHighlighted) && editing)
{