public override void Draw(SpriteBatch spriteBatch) { spriteBatch.GraphicsDevice.Clear(Color.LightBlue); map.Draw(spriteBatch); player.Draw(spriteBatch); ScoreBar.DrawStatic(spriteBatch); spriteBatch.DrawString(font, $"{player.Name}: {player.CoinsCount}", Values.scoresPosition, new Color(228, 209, 209)); spriteBatch.DrawString(font, $"До окончания {(Player.isOnLevelTwo ? 2 : 1)} уровня {(Player.isOnLevelTwo ? (int)winTimer.ResidualTime.TotalSeconds : (int)nextLevelTimer.ResidualTime.TotalSeconds)} секунд!", Values.levelUpTimerPosition, new Color(228, 209, 209)); }
protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(new Color(29, 172, 224)); spriteBatch.Begin(); map.Draw(spriteBatch, assets); player.Draw(spriteBatch, assets); spriteBatch.End(); base.Draw(gameTime); }
public void Draw(SpriteBatch spriteBatch) { switch (screen) //Draws the screen based on Screen { case Screen.TitleScreen: break; case Screen.GameScreen: map.Draw(spriteBatch); character.Draw(spriteBatch); break; case Screen.LoadingScreen: break; } }
public override void Draw() { sfcGameWindow.Fill(Color.White); if (nameMenu != null) { nameMenu.Draw(sfcGameWindow); sfcGameWindow.Update(); return; } //sfcGameWindow.Blit (sfcGrid, new Rectangle (new Point (0, 0), new Size (Constants.Constants.WIDTH, Constants.Constants.HEIGHT))); grid.Draw(sfcGameWindow); map.Draw(sfcGameWindow); menuBackgroundBorder.Draw(sfcGameWindow, 5, 700, 255, true); menuBackground.Draw(sfcGameWindow, 6, 700, 255, true); player.Draw(sfcGameWindow); foreach (EditorSprite s in enemies) { s.Draw(sfcGameWindow); } menu.Draw(sfcGameWindow); sfcGameWindow.Update(); }