public void removeResource(Resource r) { foreach (Resource res in resources) { if (res.Equals(r)) { resources.Remove(res); break; } } }
public void addResource(Resource r) { resources.Add(r); }
public void draw(Resource obj, SpriteBatch spriteBatch, Rectangle sourceRect) { int x = obj.position.X; int y = obj.position.Y; Color color = Color.White; Rectangle destRect = new Rectangle(x, y, width, height); spriteBatch.Draw(sprite.sprite, destRect, sourceRect, color); }