예제 #1
0
        public override void Draw(GameTime gameTime)
        {
            StateManager.graphicsDevice.Clear(Color.Black);
            Vector2 center = new Vector2(StateManager.graphicsDevice.Viewport.Width / 4, StateManager.graphicsDevice.Viewport.Height / 2);

            VectorFont.DrawString("Paused. Press P to resume", 7, center, Color.CornflowerBlue);
        }
예제 #2
0
        public override void Draw(GameTime gameTime)
        {
            StateManager.graphicsDevice.Clear(Color.Black);
            float   scale    = 7f;
            Vector2 location = new Vector2(3, 3);

            VectorFont.DrawString("Programmed by", scale, location, Color.CornflowerBlue);
            location.Y += 3 * scale;
            VectorFont.DrawString("Aidan Fairman", scale, location, Color.Coral);
        }
예제 #3
0
 public override void Draw(GameTime gameTime)
 {
     StateManager.graphicsDevice.Clear(bgColor);
     lander.Draw(gameTime);
     terrain.Draw(gameTime);
     if (lander.State == Lander.landerState.playing)
     {
         float   newFontScale = fontScale * 2.0f / 3.0f;
         Vector2 fontLocation = new Vector2(3, 3);
         VectorFont.DrawString(string.Format("Fuel {0:000.0}", lander.Fuel), fontScale, fontLocation, Color.CornflowerBlue);
         fontLocation.Y += (3 * fontScale);
         VectorFont.DrawString(string.Format("XSpeed {0:00.0}", lander.XSpeed), fontScale, fontLocation, Color.Coral);
         fontLocation.Y += (3 * fontScale);
         VectorFont.DrawString(string.Format("YSpeed {0:00.0}", lander.YSpeed), fontScale, fontLocation, Color.Coral);
         fontLocation.Y += (3 * fontScale);
         VectorFont.DrawString(string.Format("Angle {0:000}", lander.Angle), fontScale, fontLocation, Color.Coral);
         fontLocation.X = (StateManager.graphicsDevice.Viewport.Width / 10) * 7;
         fontLocation.Y = 3;
         VectorFont.DrawString("Esc to quit", newFontScale, fontLocation, Color.Coral);
         fontLocation.Y += 3 * newFontScale;
         VectorFont.DrawString("Space to thrust", newFontScale, fontLocation, Color.Coral);
         fontLocation.Y += 3 * newFontScale;
         VectorFont.DrawString("Right to rotate CW", newFontScale, fontLocation, Color.Coral);
         fontLocation.Y += 3 * newFontScale;
         VectorFont.DrawString("Left to rotate CCW", newFontScale, fontLocation, Color.Coral);
     }
     else if (lander.State == Lander.landerState.crashed)
     {
         Vector2 fontPlace = new Vector2(StateManager.graphicsDevice.Viewport.Width / 5 * 2, 4 * fontScale);
         VectorFont.DrawString("You Crashed", fontScale, fontPlace, Color.White);
         fontPlace.Y += 3 * fontScale;
         fontPlace.X  = StateManager.graphicsDevice.Viewport.Width / 5;
         VectorFont.DrawString("You get no more points and are dead", fontScale, fontPlace, Color.White);
         fontPlace.Y += 3 * fontScale;
         VectorFont.DrawString(string.Format("You had {0:000000} points", StateManager.Score), fontScale, fontPlace, Color.White);
         fontPlace.Y += 3 * fontScale;
         VectorFont.DrawString("Press ESC to go back to menu", fontScale, fontPlace, Color.White);
     }
     else
     {
         Vector2 fontPlace = new Vector2(StateManager.graphicsDevice.Viewport.Width / 5 * 2, 4 * fontScale);
         VectorFont.DrawString("You Landed", fontScale, fontPlace, Color.Black);
         fontPlace.Y += 3 * fontScale;
         fontPlace.X  = StateManager.graphicsDevice.Viewport.Width / 5;
         VectorFont.DrawString(string.Format("You get {0:0000} points", (lander.Fuel * 100)), fontScale, fontPlace, Color.Black);
         fontPlace.Y += 3 * fontScale;
         VectorFont.DrawString(string.Format("You have {0:0000} points", StateManager.Score), fontScale, fontPlace, Color.Black);
         fontPlace.Y += 3 * fontScale;
         fontPlace.X  = StateManager.graphicsDevice.Viewport.Width / 10;
         VectorFont.DrawString("Press Enter to go to next landing site", fontScale, fontPlace, Color.Black);
         fontPlace.Y += 3 * fontScale;
         fontPlace.X  = StateManager.graphicsDevice.Viewport.Width / 5;
         VectorFont.DrawString("Press ESC to go back to menu", fontScale, fontPlace, Color.Black);
     }
 }
예제 #4
0
        public override void Draw(GameTime gameTime)
        {
            StateManager.graphicsDevice.Clear(Color.Black);
            float   Scale    = 7;
            Vector2 location = new Vector2(3, 3);

            VectorFont.DrawString("Press Enter to Play", Scale, location, Color.CornflowerBlue);
            location.Y += (3 * Scale);
            VectorFont.DrawString("Press C to see credits", Scale, location, Color.CornflowerBlue);
            location.Y += (3 * Scale);
            VectorFont.DrawString("Press Q to quit", Scale, location, Color.CornflowerBlue);
        }