Exemple #1
0
        public virtual void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch)
        {
            if (!gameStarted || Screen.Selected != GameMain.GameScreen || GUI.DisableHUD)
            {
                return;
            }

            inGameHUD.DrawManually(spriteBatch);

            if (EndVoteCount > 0)
            {
                GUI.DrawString(spriteBatch, new Vector2(GameMain.GraphicsWidth - 180.0f, 40),
                               TextManager.Get("EndRoundVotes").Replace("[y]", EndVoteCount.ToString()).Replace("[n]", (EndVoteMax - EndVoteCount).ToString()),
                               Color.White,
                               font: GUI.SmallFont);
            }

            if (respawnManager != null)
            {
                string respawnInfo = "";
                if (respawnManager.CurrentState == RespawnManager.State.Waiting &&
                    respawnManager.CountdownStarted)
                {
                    respawnInfo = TextManager.Get(respawnManager.UsingShuttle ? "RespawnShuttleDispatching" : "RespawningIn");
                    respawnInfo = respawnInfo.Replace("[time]", ToolBox.SecondsToReadableTime(respawnManager.RespawnTimer));
                }
                else if (respawnManager.CurrentState == RespawnManager.State.Transporting)
                {
                    respawnInfo = respawnManager.TransportTimer <= 0.0f ?
                                  "" :
                                  TextManager.Get("RespawnShuttleLeavingIn").Replace("[time]", ToolBox.SecondsToReadableTime(respawnManager.TransportTimer));
                }

                if (respawnManager != null)
                {
                    GUI.DrawString(spriteBatch,
                                   new Vector2(120.0f, 10),
                                   respawnInfo, Color.White, null, 0, GUI.SmallFont);
                }
            }
        }