/// <summary> /// Creates a number of stars at a given point and swarms /// them to the location on the screen. As they reach the /// point, this plays the new star sound and adds the star /// to the score. The directions of the stars are random and /// radiate out from the point. /// </summary> public void SwarmStars(int number, PointF origin) { // Create a number of stars swarm particals for (int i = 0; i < number; i++) { // Create the particle SwarmParticle sp = new SwarmParticle(); sp.CurrentX = origin.X; sp.CurrentY = origin.Y; sp.TargetX = indicators.StarPoint.X; sp.TargetY = indicators.StarPoint.Y; // Add the star starSwarm.Add(sp); } }