public void Draw(ExtendedSpriteBatch spriteBatch) { foreach (var rect in FilledRects) { spriteBatch.FillRectangle(rect, Color.Black ); } }
public void Draw(ExtendedSpriteBatch spriteBatch) { if (Active) { spriteBatch.DrawRectangle(Rect, Color.Black); spriteBatch.FillRectangle(Rect, PaintColor); } }
public void Draw(ExtendedSpriteBatch spriteBatch) { spriteBatch.DrawRectangle(new Rectangle((int)Position.X-Width/2, (int)Position.Y-Height/2, Width, Height), Color.Black); spriteBatch.FillRectangle(new Rectangle((int)_maxPosition.X, (int) _maxPosition.Y, 2, 2), Color.Red ); }
private void DrawRectangles(ExtendedSpriteBatch spriteBatch) { foreach (var rect in _rectangles.Reverse<PaintedRectangle>()) { spriteBatch.FillRectangle(rect.Rect, rect.RectColor); } }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new ExtendedSpriteBatch(GraphicsDevice); _spriteFont = Content.Load<SpriteFont>("PlaqueFont"); _newLevelFont = Content.Load<SpriteFont>("NewLevelFont"); collisionSound = Content.Load<SoundEffect>("Collision"); _paintSound = Content.Load<SoundEffect>("PaintSound"); MoveSound = Content.Load<SoundEffect>("Move"); _themeSong = Content.Load<Song>("Minimalist2"); _blendedColorSound = Content.Load<SoundEffect>("BlendedColorSound"); _filledRect = Content.Load<SoundEffect>("FilledRect"); MediaPlayer.Play(_themeSong); MediaPlayer.IsRepeating = true; }