public override void Draw(SpriteBatch spriteBatch, GameTime gameTime)
        {
            gameMap.Draw(spriteBatch, gameTime, tickCount, gameMap.ScrollRows);

            player.Draw(spriteBatch, gameTime, tickCount, gameMap.ScrollRows);
            player.Draw(spriteBatch, gameTime, tickCount, gameMap.ScrollRows);

            princess.Draw(spriteBatch, gameTime, tickCount, gameMap.ScrollRows);

            if (showLove)
            {
                DrawLove(spriteBatch);
            }

            var textHeight = font.MeasureString("SCORE").Y;

            spriteBatch.DrawString(font, string.Format(GameResources.ScoreHeader), new Vector2(topLeftCorner.X, screenSize.Y - textHeight * 2), Color.White);
            spriteBatch.DrawString(font, string.Format("   {0:d5}    {1:d5}    {2:d2}     {3:d2}  ", score, hiScore, (int)(player.Lives), levelNumber), new Vector2(topLeftCorner.X, screenSize.Y - textHeight), Color.White);

            if (gameMap.State == MapState.Paused)
            {
                DrawStringCentralized(spriteBatch, GameResources.Paused);
            }
        }
예제 #2
0
 private void DrawPlayer(SpriteBatch spriteBatch, GameTime gameTime)
 {
     player.Draw(spriteBatch, gameTime, tickCount, gameMap.ScrollRows);
 }