public void DrawSS2(GameTime gameTime) { LoadSS2(); // This is the 1st level splash screen spriteBatch.Begin(); levelText.Draw(spriteBatch); spriteBatch.End(); }
/// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.DeepSkyBlue); // TODO: Add your drawing code here spriteBatch.Begin(); scrollBack.Draw(spriteBatch); scrollFore.Draw(spriteBatch); particleList.Draw(spriteBatch); spritePlayer.Draw(spriteBatch); enemyList.Draw(spriteBatch); playerBulletList.Draw(spriteBatch); textScore.Draw(spriteBatch); //enter to start text if (!startGame) { textStartGame.Draw(spriteBatch); } //display bounding boxes if (showbb) { spritePlayer.drawBB(spriteBatch, Color.Red); LineBatch.drawLineRectangle(spriteBatch, playArea, Color.Purple); enemyList.drawInfo(spriteBatch, Color.Red, Color.Blue); playerBulletList.drawInfo(spriteBatch, Color.Red, Color.Blue); } spriteBatch.End(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { graphicsDevice.Clear(Color.DeepSkyBlue); // TODO: Add your drawing code here spriteBatch.Begin(); scrollBack.colour = Color.Aqua; scrollBack.Draw(spriteBatch); scrollFore.Draw(spriteBatch); particleList.Draw(spriteBatch); player.Draw(spriteBatch); enemyList.Draw(spriteBatch); playerBulletList.Draw(spriteBatch); textScore.Draw(spriteBatch); //display bounding boxes if (Game1.showbb) { player.drawBB(spriteBatch, Color.Red); LineBatch.drawLineRectangle(spriteBatch, player.playArea, Color.Purple); enemyList.drawInfo(spriteBatch, Color.Red, Color.Blue); playerBulletList.drawInfo(spriteBatch, Color.Red, Color.Blue); } switch (levelState) { case LEVELSTATE.LEVELSTART: textVarious = new TextRenderable("LEVEL: " + level.ToString(), new Vector2(Game1.SCREEN_WIDTH / 2, Game1.SCREEN_HEIGHT / 2), spriteFont, Color.Red); textVarious.Draw(spriteBatch); textVarious = new TextRenderable("Enemies: " + enemyToSpawn.ToString(), new Vector2(Game1.SCREEN_WIDTH / 2, Game1.SCREEN_HEIGHT / 2 + 30), spriteFont, Color.Red); textVarious.Draw(spriteBatch); break; case LEVELSTATE.LEVELGAMEOVER: textVarious = new TextRenderable("GAME OVER", new Vector2(Game1.SCREEN_WIDTH / 2, Game1.SCREEN_HEIGHT / 2), spriteFont, Color.Red); textVarious.Draw(spriteBatch); textVarious = new TextRenderable("Press Q to go to menu.", new Vector2(Game1.SCREEN_WIDTH / 2, (Game1.SCREEN_HEIGHT / 2) + 30), spriteFont, Color.Red); textVarious.Draw(spriteBatch); break; case LEVELSTATE.LEVELFINISH: textVarious = new TextRenderable("LEVEL FINISHED", new Vector2(Game1.SCREEN_WIDTH / 2, Game1.SCREEN_HEIGHT / 2), spriteFont, Color.Red); textVarious.Draw(spriteBatch); textVarious = new TextRenderable("Press Enter to go to Next Level.", new Vector2(Game1.SCREEN_WIDTH / 2, Game1.SCREEN_HEIGHT / 2 + 30), spriteFont, Color.Red); textVarious.Draw(spriteBatch); break; } textLevel.Draw(spriteBatch); spriteBatch.End(); }
public override void Draw(GameTime gameTime) { spriteBatch.Begin(); spriteBatch.Draw(texBackground, new Rectangle(0, 0, Game1.SCREEN_WIDTH, Game1.SCREEN_HEIGHT), Color.White); spriteBatch.Draw(texForeground, new Rectangle(0, 0, Game1.SCREEN_WIDTH, Game1.SCREEN_HEIGHT), Color.White); textPause.Draw(spriteBatch); spriteBatch.End(); }
public override void Draw(GameTime gameTime) { graphicsDevice.Clear(Color.LightCoral); //implements a camera spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, null, null, null, null, cam.get_transformation(graphicsDevice)); //background here platformList.Draw(spriteBatch); enemyList.Draw(spriteBatch); sliceList.Draw(spriteBatch); particleList.Draw(spriteBatch); player.Draw(spriteBatch); if (showbb) { //enemyList.drawInfo(spriteBatch, Color.Red, Color.Yellow); sliceList.drawInfo(spriteBatch, Color.Red, Color.Yellow); player.drawBB(spriteBatch, Color.Red); platformList.drawInfo(spriteBatch, Color.Red, Color.Yellow); LineBatch.drawLineRectangle(spriteBatch, new Rectangle((int)PlayerSpawnPosition.X, (int)PlayerSpawnPosition.Y, 20, 20), Color.Black); LineBatch.drawLineRectangle(spriteBatch, OutOfBounds, Color.Red); } goal.Draw(spriteBatch); spriteBatch.End(); //DRAW UI STUFF HERE spriteBatch.Begin(); abilityIconDoubleJump.Draw(spriteBatch); abilityIconDash.Draw(spriteBatch); abilityIconSlice.Draw(spriteBatch); TextRenderable score = new TextRenderable("SCORE: " + Game1.TimeScore.ToString(), new Vector2(100, 100), MenuScreen.menuFont, Color.Black); score.Draw(spriteBatch); //spriteBatch.Draw(texMouseCursor, new Vector2(InputManager.Instance.GetMousePositionX(), InputManager.Instance.GetMousePositionY()), Color.White); spriteBatch.Draw(texMouseCursor, null, new Rectangle(InputManager.Instance.GetMousePositionX(), InputManager.Instance.GetMousePositionY(), 30, 30), null, null, 0, null, Color.White, SpriteEffects.FlipHorizontally, 0); spriteBatch.End(); }
/// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); // TODO: Add your drawing code here levelManager.getCurrentLevel().Draw(gameTime); if (toggleHelp) { spriteBatch.Begin(); TextRenderable helpStuff = new TextRenderable("GAMEPAD: A to jump/select. B to dash. RB to slice.", new Vector2(100, 100), MenuScreen.menuFont, Color.Black); helpStuff.Draw(spriteBatch); helpStuff = new TextRenderable("KEYBOARD: Z to jump/select. C to dash. X to slice. ARROWS to move", new Vector2(100, 150), MenuScreen.menuFont, Color.Black); helpStuff.Draw(spriteBatch); spriteBatch.End(); } base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { spriteBatch.Begin(); spriteBatch.Draw(texBackground, new Rectangle(0, 0, Game1.SCREEN_WIDTH, Game1.SCREEN_HEIGHT), Color.White); spriteBatch.Draw(texForeground, new Rectangle(0, 0, Game1.SCREEN_WIDTH, Game1.SCREEN_HEIGHT), Color.White); if ((int)timer % 2 == 0) { textEnter = new TextRenderable("PRESS ENTER TO START", new Vector2(Game1.SCREEN_WIDTH / 2 - 100, Game1.SCREEN_HEIGHT / 2), spriteFont, Color.Red); textEnter.Draw(spriteBatch); textEnter = new TextRenderable("PRESS ESCAPE TO QUIT", new Vector2(Game1.SCREEN_WIDTH / 2 - 100, Game1.SCREEN_HEIGHT / 2 + 40), spriteFont, Color.Red); textEnter.Draw(spriteBatch); } spriteBatch.End(); }
public override void Draw(GameTime gameTime) { Vector2 middleScreen = new Vector2(Game1.SCREEN_WIDTH / 2, Game1.SCREEN_HEIGHT / 2); spriteBatch.Begin(); textRenderable = new TextRenderable(titleString, middleScreen + new Vector2(0, -100), titleFont, Color.White); textRenderable.Draw(spriteBatch); for (int i = 0; i < menuStrings.Count; i++) { textRenderable = new TextRenderable(menuStrings[i], middleScreen + new Vector2(0, i * 50), menuFont, Color.White); textRenderable.Draw(spriteBatch); } textRenderable = new TextRenderable("HIGHSCORES", middleScreen + new Vector2(-300, -50), menuFont, Color.White); textRenderable.Draw(spriteBatch); for (int i = 0; i < 5; i++) { textRenderable = new TextRenderable((i + 1).ToString() + ". " + Game1.Scores[i].ToString(), middleScreen + new Vector2(-300, i * 50), menuFont, Color.White); textRenderable.Draw(spriteBatch); } if (unlockChallengeMode == true) { textRenderable = new TextRenderable("CHALLENGE HIGHSCORES", middleScreen + new Vector2(300, -50), menuFont, Color.Red); textRenderable.Draw(spriteBatch); for (int i = 0; i < 5; i++) { textRenderable = new TextRenderable((i + 1).ToString() + ". " + Game1.ChallengeScores[i].ToString(), middleScreen + new Vector2(300, i * 50), menuFont, Color.Red); textRenderable.Draw(spriteBatch); } } selector.Position = middleScreen + new Vector2(200, menuSelector * 50 - selector.getWidth() / 2); selector.Draw(spriteBatch); particleList.Draw(spriteBatch); sliceList.Draw(spriteBatch); spriteBatch.End(); }