hi dear guys !
i have a problem in supermario xna ! could u plz help me??
Look ! i have defined struct (rect) with this code in public class Game1:
Code:
public struct rect
{
public Texture2D texture;
public Rectangle posSize;
public void draw(SpriteBatch s)
{
s.Draw(texture, posSize, Color.White);
}
}
public rect bigRect1,bigRect2;
public rect[] bigRectangles = new rect[2]; //define an array
then i initialize them in public Game1:
Code:
bigRect1.posSize = new Rectangle(0, 450, 500, 150);
bigRect2.posSize = new Rectangle(0, 0, 1450, 100);
now i want to put them in an array (named bigRectangles) and then i wanna draw them ... so how can i draw them ? (actually i wanna draw them with a for loop and array)
tnQ