Im doing a dxball like game for a school project. I am trying to create spawn points for the objects(blocks) that will move across the screen. But my problem is when i lets say create 2 objects of type Block. They will get the same random spawnlocation and they will keep having the same respawn location at all time. So i guess i am doing to random function wrong
public class blocks
{
public Texture2D texturBlock1;
public Vector2 hastighet = new Vector2(500.0f, 000.0f);
public Vector2 position;
private Random random = new Random();
private int Screen = new int();
public blocks(int MaxWith)
{
this.position.X = MaxWith+10;
this.position.Y = random.Next(300);
Screen = MaxWith;
}
I would love if someone could help me out. I am a real novice when it comes to XNA and c#