Наследование: Jurassic.Library.ObjectInstance
Пример #1
0
 public static void Emit(EmitterInstance emitter, int times)
 {
     for (int i = 0; i < times; ++i)
     {
         for (int n = 0; n < _particles.Length; ++n)
         {
             if (_particles[n].Life <= 0) { _particles[n].Setup(emitter); break; }
         }
     }
 }
Пример #2
0
 public void Setup(EmitterInstance parent)
 {
     _color = parent.Color.Color;
     _x = parent.StartX;
     _vx = parent.Speed * Math.Cos(parent.Angle);
     _y = parent.StartY;
     _vy = parent.Speed * Math.Sin(parent.Angle);
     _img = parent.Image.Texture;
     _total = parent.Life;
     Life = parent.Life;
 }