public void Draw(SpriteBatch spriteBatch, GameTime gameTime) { foreach (CoinEntity coin in _entityManager.GetEntitiesOfType <CoinEntity>()) { _rotatingCoinAnimation.Draw(spriteBatch, coin.Position); } }
public override void Draw(SpriteBatch spriteBatch, Vector2 startDrawLocation) { // Draw debugging tiles if (game.DevMode) { for (int i = 0; i < surroundingTiles.Length; i++) { util.DrawRectangle(surroundingTiles[i].Bounds, surroundingTiles[i].DevColor, spriteBatch, game); } util.DrawRectangle(currentTile.Bounds, Color.White, spriteBatch, game); if ((int)direction >= 0) { util.DrawRectangle(nextTile.Bounds, Color.Violet, spriteBatch, game); } util.DrawRectangle(Bounds, Color.Brown, spriteBatch, game); } // Draw pacman animation.Draw(spriteBatch, startDrawLocation + drawLocation, (int)direction); animation.Draw(spriteBatch, startDrawLocation + drawTunnelLocationLeft, (int)direction); animation.Draw(spriteBatch, startDrawLocation + drawTunnelLocationRight, (int)direction); }