Esempio n. 1
0
 public void Emit(ParticleType type, int amount, Vector2 position, Vector2 positionRange, Color color, float direction)
 {
     for (int i = 0; i < amount; i++)
     {
         Emit(type, Calc.Random.Range(position - positionRange, position + positionRange), color, direction);
     }
 }
Esempio n. 2
0
 public void Emit(ParticleType type, int amount, Vector2 position, Vector2 positionRange)
 {
     for (int i = 0; i < amount; i++)
     {
         Emit(type, Calc.Random.Range(position - positionRange, position + positionRange));
     }
 }
Esempio n. 3
0
        public ParticleType(ParticleType copyFrom)
        {
            Source             = copyFrom.Source;
            SourceChooser      = copyFrom.SourceChooser;
            Color              = copyFrom.Color;
            Color2             = copyFrom.Color2;
            ColorMode          = copyFrom.ColorMode;
            FadeMode           = copyFrom.FadeMode;
            SpeedMin           = copyFrom.SpeedMin;
            SpeedMax           = copyFrom.SpeedMax;
            SpeedMultiplier    = copyFrom.SpeedMultiplier;
            Acceleration       = copyFrom.Acceleration;
            Friction           = copyFrom.Friction;
            Direction          = copyFrom.Direction;
            DirectionRange     = copyFrom.DirectionRange;
            LifeMin            = copyFrom.LifeMin;
            LifeMax            = copyFrom.LifeMax;
            Size               = copyFrom.Size;
            SizeRange          = copyFrom.SizeRange;
            RotationMode       = copyFrom.RotationMode;
            SpinMin            = copyFrom.SpinMin;
            SpinMax            = copyFrom.SpinMax;
            SpinFlippedChance  = copyFrom.SpinFlippedChance;
            ScaleOut           = copyFrom.ScaleOut;
            UseActualDeltaTime = copyFrom.UseActualDeltaTime;

            AllTypes.Add(this);
        }
Esempio n. 4
0
 public void Emit(ParticleType type, Entity track, int amount, Vector2 position, Vector2 positionRange, float direction)
 {
     for (int i = 0; i < amount; i++)
     {
         type.Create(ref particles[nextSlot], track, Calc.Random.Range(position - positionRange, position + positionRange), direction, type.Color);
         nextSlot = (nextSlot + 1) % particles.Length;
     }
 }
Esempio n. 5
0
 public ParticleEmitter(ParticleSystem system, ParticleType type, Vector2 position, Vector2 range, int amount, float interval) : base(true, false)
 {
     System   = system;
     Type     = type;
     Position = position;
     Range    = range;
     Amount   = amount;
     Interval = interval;
 }
Esempio n. 6
0
 public void Emit(ParticleType type, Vector2 position)
 {
     type.Create(ref particles[nextSlot], position);
     nextSlot = (nextSlot + 1) % particles.Length;
 }
Esempio n. 7
0
 public void Emit(ParticleType type, Vector2 position, Color color, float direction)
 {
     type.Create(ref particles[nextSlot], position, color, direction);
     nextSlot = (nextSlot + 1) % particles.Length;
 }
Esempio n. 8
0
 public ParticleEmitter(ParticleSystem system, ParticleType type, Entity track, Vector2 position, Vector2 range, float direction, int amount, float interval)
     : this(system, type, position, range, amount, interval)
 {
     Direction = direction;
     Track     = track;
 }