public void DrawL1(GameTime gameTime) { // now the user can actually play the game - this is level 1 spriteBatch.Begin(); background.Draw(spriteBatch); playerSprite.Draw(spriteBatch); yarnBalls.Draw(spriteBatch); // draw the bounding box if the user needs it if (showBB) { playerSprite.drawBB(spriteBatch, Color.Red); } 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); }
/// <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 spriteBatch.Begin(); back1.Draw(spriteBatch); //*** grass1.Draw(spriteBatch); paddle.Draw(spriteBatch); //*** enemyList.Draw(spriteBatch); ballList.Draw(spriteBatch); booms.Draw(spriteBatch); spriteBatch.DrawString(font, "Enemies Slain: " + score, new Vector2(rhs - 140, top + 10), Color.Black); if (showbb) { paddle.drawBB(spriteBatch, Color.Black); paddle.drawHS(spriteBatch, Color.Green); enemyList.drawInfo(spriteBatch, Color.Red, Color.Yellow); LineBatch.drawLineRectangle(spriteBatch, playArea, Color.Blue); ballList.drawInfo(spriteBatch, Color.Gray, Color.Green); } spriteBatch.End(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { graphicsDevice.Clear(Color.BlanchedAlmond); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied); scrolling1.Draw(spriteBatch); scrolling2.Draw(spriteBatch); back1.Draw(spriteBatch); //*** paddle.Draw(spriteBatch); //*** ball.draw(spriteBatch); if (p != null) { p.Draw(spriteBatch); } if (showbb) { paddle.drawBB(spriteBatch, Color.Black); paddle.drawHS(spriteBatch, Color.Green); dragonList.drawInfo(spriteBatch, Color.Red, Color.Blue); LineBatch.drawLineRectangle(spriteBatch, playArea, Color.Blue); ball.drawInfo(spriteBatch, Color.Gray, Color.Green); } if (ball.getPosY() > bot) { //ball.setPosY(60); spriteBatch.DrawString(font1, "Game Over!", new Vector2(100, 100), Color.Green); //dragonList.drawActive(spriteBatch); } //foreach (Sprite3 p in Spritewall) // p.Draw(spriteBatch); if (wl != null) { wl.Draw(spriteBatch, Color.Teal, Color.Red); } LineBatch.drawLineRectangle(spriteBatch, rectangle, Color.Gray); //draw animation //string output1 = "Socre: "; Vector2 FontOrigin1 = font1.MeasureString("a") / 2; spriteBatch.DrawString(font1, "Score " + scoure.ToString(), new Vector2(100, 100), Color.Green); //anmiation1.Draw(spriteBatch); // dragon.Draw(spriteBatch); //if(dragonList != null) dragonList.drawActive(spriteBatch); spriteBatch.End(); }
public void DrawL2(GameTime gameTime) { spriteBatch.Begin(); background.Draw(spriteBatch); crazyDog.Draw(spriteBatch); playerSprite.Draw(spriteBatch); // draw the bounding box if the user needs it if (showBB) { playerSprite.drawBB(spriteBatch, Color.Red); crazyDog.drawBB(spriteBatch, Color.Red); } 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); spriteBatch.Begin(); back1.Draw(spriteBatch); //*** paddle.Draw(spriteBatch); //*** ball.Draw(spriteBatch); sl.Draw(spriteBatch); if (showbb) { paddle.drawBB(spriteBatch, Color.Black); paddle.drawHS(spriteBatch, Color.Green); ball.drawInfo(spriteBatch, Color.Gray, Color.Green); sl.drawInfo(spriteBatch, Color.Brown, Color.Aqua); LineBatch.drawLineRectangle(spriteBatch, playArea, Color.Blue); } spriteBatch.End(); // TODO: Add your drawing code here base.Draw(gameTime); }
/// <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); //All the elements that are displayed on screen are drawn here switch (level) { case 1: spriteBatch.Begin(transformMatrix: mainCamera.Transform); worldMap.Draw(spriteBatch); spriteBatch.DrawString(font, "Current position: " + curPos, new Vector2(horse.getPosX() - 200, horse.getPosY() - 200), Color.White); //horse.Draw(spriteBatch); horseRun.Draw(spriteBatch); spriteBatch.End(); break; default: spriteBatch.Begin(); scrolling1.Draw(spriteBatch); scrolling2.Draw(spriteBatch); enemies.Draw(spriteBatch); horseRun.Draw(spriteBatch); bloodSplat.Draw(spriteBatch); //arrow.Draw(spriteBatch); quiver.Draw(spriteBatch); goldBanner.Draw(spriteBatch); spriteBatch.DrawString(font, "Gold: " + score, new Vector2(30, 20), Color.Black); //This is the start screen that goes away once player presses the enter key if (!started) { startBanner.Draw(spriteBatch); switch (difficulty) { case 1: spriteBatch.DrawString(difficultySelectText, "Current difficulty: Easy", new Vector2(10, 500), Color.Black); break; case 2: spriteBatch.DrawString(difficultySelectText, "Current difficulty: Medium", new Vector2(10, 500), Color.Black); break; case 3: spriteBatch.DrawString(difficultySelectText, "Current difficulty: Hard", new Vector2(10, 500), Color.Black); break; default: spriteBatch.DrawString(difficultySelectText, "Current difficulty: Easy", new Vector2(10, 500), Color.Black); break; } spriteBatch.DrawString(difficultySelectText, "Click 1, 2 or 3 to assign difficulty. 1 = easy | 2 = medium | 3 = hard" + Environment.NewLine, new Vector2(10, 560), Color.Black); } //This displays some basic instructions for the player if (textFadeTimer < 3 && started) { spriteBatch.DrawString(directions, "< : slow down | > : speed up " + Environment.NewLine + "^ : move up | v : move down" + Environment.NewLine + "spacebar : shoot arrow", new Vector2(400, 10), Color.Black); } //When player dies text and a book appear on screen if (gameOver && deathTimer > 1) { book.Draw(spriteBatch); } //Bounding boxes for player, enemies, arrows and the play area if (showbb) { enemies.drawInfo(spriteBatch, Color.Red, Color.DarkRed); horse.drawBB(spriteBatch, Color.Black); //horse.drawHS(spriteBatch, Color.Green); //don't know if this is required for assessment or not quiver.drawInfo(spriteBatch, Color.Brown, Color.SandyBrown); LineBatch.drawLineRectangle(spriteBatch, playArea, Color.Blue); } spriteBatch.End(); break; } ; base.Draw(gameTime); }