Exemple #1
0
 private void DrawTile(int value, int x, int y, SpriteBatch spriteBatch)
 {
     if (value == Powerup_Tile)
     {
         spriteBatch.Draw(contentManager.Get <Texture2D>("apple"), new Vector2(x, y), null);
     }
     else if (value == Wall_Tile)
     {
         spriteBatch.Draw(contentManager.Get <Texture2D>("wall"), new Vector2(x, y), null);
     }
 }
Exemple #2
0
 public void Draw(GameContentManager contentManager, SpriteBatch spriteBatch)
 {
     spriteBatch.Draw(contentManager.Get <Texture2D>(Texture), new Vector2(X * (int)TileSize.X, Y * (int)TileSize.Y), Color.White);
 }