public override void Draw(SpriteBatch spriteBatch) { TheLastSliceGame.Instance.IsMouseVisible = false; if (CustomWinStrings.Count > 0) { if (TheLastSliceGame.Instance.GameService.IsSuccessStatusCode) { DrawStrings(spriteBatch, CustomWinStrings.ToArray(), YouWin, 150, 40); } else { YouWinString[0] = CustomWinStrings[0].Replace("\"", "") + "#" + TryAgain; Posted = false; Initials = ""; HasInputScore = false; CustomWinStrings = new List <String>(); } } else { DrawStrings(spriteBatch, YouWinString, YouWin, 50, 40); // spriteBatch.DrawString(Text, "Score: " + LastPlayerScore, new Vector2(TheLastSliceGame.GameWidth / 2 - 60, 140), ColorYellow); DrawStrings(spriteBatch, EnterNameString, YouWin, 200, 40); if (!HasInputScore && Initials.Count() >= 3) { ArrowLeft.Draw(spriteBatch); ArrowRight.Draw(spriteBatch); Menu.Draw(spriteBatch); } if (HasInputScore && !TheLastSliceGame.Instance.IsUserLoggedIn()) { DrawStrings(spriteBatch, LoginString, YouWin, 500, 40); } int xPos = TheLastSliceGame.Instance.GameWidth / 2 - 110; for (int i = 0; i < Initials.Count(); i++) { spriteBatch.DrawString(Name, Initials.ElementAt(i).ToString(), new Vector2(xPos, 340), Color.White); if (i < 2) { xPos += 88; } } if (ShowCursor) { spriteBatch.DrawString(Name, "_", new Vector2(xPos, 350), Color.White); } } }
public override void Draw(SpriteBatch spriteBatch) { //All your base are belong to us - H.E.% TheLastSliceGame.Instance.IsMouseVisible = true; spriteBatch.Draw(Background, new Vector2(0, 0), Color.White); spriteBatch.DrawString(GameOver, GameOverText, new Vector2(GameOverX, GameOverY), Color.White); spriteBatch.DrawString(Text, NoTipForYouText, new Vector2(NoTipForYouX, NoTipForYouY), Color.White); spriteBatch.Draw(Bubble, new Vector2(BubbleX, BubbleY), Color.White); if (GameOverReason == GameOverReason.WrongDelivery || GameOverReason == GameOverReason.Win || GameOverReason == GameOverReason.WrongDeliveryFrog) { DrawBubbleText(WrongDeliveryMessages[WrongDeliveryMessageNumber], spriteBatch); } else if (GameOverReason == GameOverReason.DeathByPaperBoy) { DrawBubbleText(PaperMessages[PaperMessageNumber], spriteBatch); } else if (GameOverReason == GameOverReason.Death) { DrawBubbleText(DeathMessages[DeathMessageNumber], spriteBatch); } else if (GameOverReason == GameOverReason.Gas) { DrawBubbleText(OutOfGasMessages[OutOfGasMessageNumber], spriteBatch); } ArrowLeft.Draw(spriteBatch); ArrowRight.Draw(spriteBatch); if (Frog.AnimationManager.Animation.CurrentFrame == 3) { Vector2 newFrogPos = new Vector2(Frog.Position.X - 5, Frog.Position.Y); Frog.Position = newFrogPos; Frog.AnimationManager.Position = newFrogPos; } int scoreXPos = MenuXCenter - (5 * Score.ToString().Length - 1); spriteBatch.DrawString(Text, "Score: " + Score.ToString(), new Vector2(scoreXPos - 40, 325), Color.White); if (Frog.Position.X < 0) { Frog.Position = new Vector2(TheLastSliceGame.Instance.GameWidth, 375); } Frog.Draw(spriteBatch); Menu.Draw(spriteBatch); }
public override void Draw(SpriteBatch spriteBatch) { spriteBatch.Draw(Background, new Vector2(0, 0), Color.White); spriteBatch.Draw(Leaderboard, new Vector2(TheLastSliceGame.Instance.GameWidth / 2 - Leaderboard.Width / 2, 25), Color.White); int yPos = 100; int numEntriesToShow = (LeaderboardList.Count <= 10) ? LeaderboardList.Count : 10; int yOffset = 10; for (int i = 0; i < numEntriesToShow; i++) { LeaderboardEntry entry = LeaderboardList[i]; spriteBatch.DrawString(Text, entry.Initials, new Vector2(200, yPos), ColorYellow); if (entry.Challenge1 != null) { spriteBatch.Draw(entry.Challenge1, new Vector2(300, yPos - yOffset), Color.White); } if (entry.Challenge2 != null) { spriteBatch.Draw(entry.Challenge2, new Vector2(400, yPos - yOffset), Color.White); } if (entry.Challenge3 != null) { spriteBatch.Draw(entry.Challenge3, new Vector2(500, yPos - yOffset), Color.White); } yPos += 40; } if (SnakeInTheBox.AnimationManager.Animation.CurrentFrame % 2 == 0) { Vector2 newSnakePos = new Vector2(SnakeInTheBox.Position.X + 1, SnakeInTheBox.Position.Y); SnakeInTheBox.Position = newSnakePos; SnakeInTheBox.AnimationManager.Position = newSnakePos; } if (SnakeInTheBox.Position.X < TheLastSliceGame.Instance.GameWidth) { SnakeInTheBox.Draw(spriteBatch); } ArrowLeft.Draw(spriteBatch); ArrowRight.Draw(spriteBatch); spriteBatch.Draw(Exit, new Vector2(TheLastSliceGame.Instance.GameWidth / 2 - Exit.Width / 2, 525), Color.White); }