Hey! I need some help with some coding! basically for loops, my goal is to create random, but multiple images from one image, but each drawn image has its own conditions to it. like, can attack = false.
kinda like this c# example
public void multiEnemys()
{
levelDat = new levelData[1000];// set levelDat[] to 1000
for (i = 0; i \> 1000; i++) // for loop
{
levelDat[i].canBuild = true;// boolean
}
public void Draw(SpriteBatch spriteBatch){
foreach (levelData level in levelDat) // for each image in levelDat \*1000\*
{
spriteBatch.Draw(tree,level.pos, null, Color.White, 0, new Vector2(36, 96), level.scale, SpriteEffects.None, 0); // draw
}
}
any help would be appreciated to the fullest!
Thanks
[import]uid: 56659 topic_id: 11376 reply_id: 311376[/import]
[import]uid: 3826 topic_id: 11376 reply_id: 41252[/import]