(3c4a367f1) Added structural section damage indication to DebugDraw

This commit is contained in:
Joonas Rikkonen
2019-04-17 12:42:35 +03:00
parent e0fe737c3b
commit 1615e2f6aa

View File

@@ -322,6 +322,17 @@ namespace Barotrauma
-Bodies[i].Rotation, Color.White);
}
}
if (SectionCount > 0 && HasBody)
{
for (int i = 0; i < SectionCount; i++)
{
var textPos = SectionPosition(i, true);
textPos.Y = -textPos.Y;
GUI.DrawString(spriteBatch, textPos, "Damage: " + (int)((GetSection(i).damage / Health) * 100f) + "%", Color.Yellow);
}
}
AiTarget?.Draw(spriteBatch);
}
}