private SpriteBatch spriteBatch; //allows us to write on backbuffer when we need to draw self public Paddle(float x, float y, float screenWidth, SpriteBatch spriteBatch, GameContent gameContent) { X = x; Y = y; imgPaddle = gameContent.imgPaddle; Width = imgPaddle.Width; Height = imgPaddle.Height; this.spriteBatch = spriteBatch; ScreenWidth = screenWidth; }
private SpriteBatch spriteBatch; //allows us to write on backbuffer when we need to draw self public Brick(float x, float y, Color color, SpriteBatch spriteBatch, GameContent gameContent) { X = x; Y = y; imgBrick = gameContent.imgBrick; Width = imgBrick.Width; Height = imgBrick.Height; this.spriteBatch = spriteBatch; Visible = true; this.color = color; }
public Ball(float screenWidth, float screenHeight, SpriteBatch spriteBatch, GameContent gameContent) { X = 0; Y = 0; XVelocity = 0; YVelocity = 0; Rotation = 0; imgBall = gameContent.imgBall; Width = imgBall.Width; Height = imgBall.Height; this.spriteBatch = spriteBatch; this.gameContent = gameContent; ScreenWidth = screenWidth; ScreenHeight = screenHeight; Visible = false; Score = 0; bricksCleared = 0; UseRotation = true; }
private SpriteBatch spriteBatch; //allows us to write on backbuffer when we need to draw self public GameBorder(float screenWidth, float screenHeight, SpriteBatch spriteBatch, GameContent gameContent) { Width = screenWidth; Height = screenHeight; imgPixel = gameContent.imgPixel; this.spriteBatch = spriteBatch; }