public void DrawStatusOverlay()
{
if (Game.Match.State == SessionState.Finished)
{
string msg = "";
if (Game.Match.Winner != null)
msg = Game.Match.Winner.Name + " won the match!";
else
msg = "Draw!";
DrawMessageOverlay(msg);
}
else if (Game.Match.UsePlayerTurns && Game.Match.ActivePlayer != null)
{
var screenPos = new Vector2(Game.GraphicsDevice.Viewport.Width - (250 * resolutionFactor), Game.GraphicsDevice.Viewport.Height - 100);
string msg;
if (Game.Match.TurnState == TurnState.Running)
{
var timeLeft = (int)(Game.Match.SecondsPerTurn - Game.Match.TurnTime);
msg = "Turn: " + Game.Match.ActivePlayer.Name + " / " + timeLeft;
}
else
{
msg = "Waiting for turn end";
}
SpriteBatch.Begin();
DrawText(msg, screenPos, 0.5f, Color.Red, centerHorizontal: true);
SpriteBatch.End();
}
}