Hi, i am a beginner at coding, and i am making a little game where a character is capturing some dots generated randomly.
Now i need each dot to be an image (same image for all), but i cant find out how to do it.
This is a piece of what I did:
Rectangle[] rects;
rects = new Rectangle[10];
Bitmap background;
Graphics scG;
public Rectangle[] makerect()
{
Random r = new Random();
for (int i = 0; i < rects.Length; i++)
{
rects[i] = new Rectangle(r.Next(0,this.Width),r.Next(0,this.Height),10,10);
}
return rects;
}
public Bitmap Draw()
{
scG.FillRectangles(Brushes.Gold, rects);
return background;
}
If anyone can help me with some lines of code, I'd appreciate it :)