Example #1
0
 public void Update()
 {
     for (int n = 0; n < totalParts; n++)
     {
         if (!particles[n].isAlive())
         {
             particles[n] = new particle(partText, new Vector2((float)rand.Next(0, 800), (float)rand.Next(0, 600)), rand.Next(4 * 60, 6 * 60));
         }
         particles[n].Update();
     }
 }
Example #2
0
        public FallingSnow(Texture2D part, int numTot)
        {
            partText = part;
            totalParts = numTot;
            rand = new Random();

            particles = new particle[numTot];
            for (int n = 0; n < numTot; n++)
            {
                particles[n] = new particle(partText, new Vector2((float)rand.Next(-200, 800), (float)rand.Next(-1000, 600)), rand.Next(4 * 60, 6 * 60));
            }
        }