Hyluss

[Monogame PingPong] Score

Oct 30th, 2018
637
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.58 KB | None | 0 0
  1. using Microsoft.Xna.Framework;
  2. using Microsoft.Xna.Framework.Graphics;
  3.  
  4. namespace PingPong
  5. {
  6.     public class Score
  7.     {
  8.         public int Score1;
  9.         public int Score2;
  10.  
  11.         private SpriteFont _font;
  12.  
  13.         public Score(SpriteFont font)
  14.         {
  15.             _font = font;
  16.         }
  17.  
  18.         public void Draw(SpriteBatch spriteBatch)
  19.         {
  20.             spriteBatch.DrawString(_font, Score1.ToString(), new Vector2(320, 70), Color.White);
  21.             spriteBatch.DrawString(_font, Score2.ToString(), new Vector2(430, 70), Color.White);
  22.         }
  23.     }
  24. }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment