Exemplo n.º 1
0
        public void Draw(SpriteBatch sb)
        {
            if (countdown.IsRunning)
            {
                long timeremaining = countdownSecs * 1000 - countdown.ElapsedMilliseconds;
                SpriteHelper.DrawText(sb, new Microsoft.Xna.Framework.Vector2(400, 400), "" + (timeremaining / 1000 + 1), Color.Red);
            }
            else if (countup.ElapsedMilliseconds > 0)
            {
                SpriteHelper.DrawText(sb, new Microsoft.Xna.Framework.Vector2(100, 20), "" + String.Format("{0:0.00}", countup.ElapsedMilliseconds / 1000f), Color.White);
            }

            foreach (Objective o in objectives)
            {
                o.Draw(sb);
            }
        }