void InitStars() { for (int i = 0; i < StarCount; i++) { Vector2 speed = new Vector2(random.Next(1, 4), 0); Vector2 position = new Vector2(random.Next(0, 481), random.Next(0, 801)); Star star = new Star(StarImage[random.Next(0, StarImage.Length)], position, speed); Stars.Add(star); } }
Star CreateStar() { Vector2 speed = new Vector2(random.Next(1, 4), 0); Vector2 position = new Vector2(-1, random.Next(0, 801)); Star star = new Star(StarImage[random.Next(0, StarImage.Length)], position, speed); return star; }