Ejemplo n.º 1
0
 public void AddSpark(Spark spark)
 {
     try
     {
         _sparks.Add(spark);
     }
     catch (Exception e)
     {
     }
 }
Ejemplo n.º 2
0
        /**
        **********************************************************************************************

        **********************************************************************************************
        **/
        public void makeSparks(SparkQueue sparkQueue)
        {
            try
            {

                if (dead)
                {
                    return;
                }

                Point position = calculatePosition();
                //Color color = Color.WHITE;
                //int size = 5;

                double newLifeSpan = sparkLifespan + (_rng.NextDouble() - .5d);
                Spark spark = new Spark(position, color, size, newLifeSpan);
                sparkQueue.AddSpark(spark);

                if (time > lifespan)
                {
                    dead = true;
                }

                time += _timeIncrement;

            }
            catch (Exception e)
            {
            }
        }