예제 #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);
     }
 }
예제 #2
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);
        }
예제 #3
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));
     }
 }
예제 #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;
     }
 }
 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;
 }
예제 #6
0
 public ParticleType(ParticleType copy)
 {
     Source = copy.Source;
     Color = copy.Color;
     Color2 = copy.Color2;
     ColorSwitch = copy.ColorSwitch;
     ColorSwitchLoop = copy.ColorSwitchLoop;
     Speed = copy.Speed;
     SpeedRange = copy.SpeedRange;
     SpeedMultiplier = copy.SpeedMultiplier;
     Acceleration = copy.Acceleration;
     Direction = copy.Direction;
     DirectionRange = copy.DirectionRange;
     Life = copy.Life;
     LifeRange = copy.LifeRange;
     Size = copy.Size;
     SizeRange = copy.SizeRange;
 }
예제 #7
0
        public ParticleType(ParticleType copy)
        {
            Source = copy.Source;
            Color = copy.Color;
            Color2 = copy.Color2;
            ColorSwitch = copy.ColorSwitch;
            ColorSwitchLoop = copy.ColorSwitchLoop;
            Speed = copy.Speed;
            SpeedRange = copy.SpeedRange;
            SpeedMultiplier = copy.SpeedMultiplier;
            Acceleration = copy.Acceleration;
            Direction = copy.Direction;
            DirectionRange = copy.DirectionRange;
            Life = copy.Life;
            LifeRange = copy.LifeRange;
            Size = copy.Size;
            SizeRange = copy.SizeRange;
            Rotated = copy.Rotated;
            RandomRotate = copy.RandomRotate;
            ScaleOut = copy.ScaleOut;

            AllTypes.Add(this);
        }
예제 #8
0
        public ParticleType(ParticleType copy)
        {
            Source          = copy.Source;
            Color           = copy.Color;
            Color2          = copy.Color2;
            ColorSwitch     = copy.ColorSwitch;
            ColorSwitchLoop = copy.ColorSwitchLoop;
            Speed           = copy.Speed;
            SpeedRange      = copy.SpeedRange;
            SpeedMultiplier = copy.SpeedMultiplier;
            Acceleration    = copy.Acceleration;
            Direction       = copy.Direction;
            DirectionRange  = copy.DirectionRange;
            Life            = copy.Life;
            LifeRange       = copy.LifeRange;
            Size            = copy.Size;
            SizeRange       = copy.SizeRange;
            Rotated         = copy.Rotated;
            RandomRotate    = copy.RandomRotate;
            ScaleOut        = copy.ScaleOut;

            AllTypes.Add(this);
        }
예제 #9
0
        public ParticleType(ParticleType copy)
        {
            Source             = copy.Source;
            Color              = copy.Color;
            Color2             = copy.Color2;
            ColorMode          = copy.ColorMode;
            Speed              = copy.Speed;
            SpeedRange         = copy.SpeedRange;
            SpeedMultiplier    = copy.SpeedMultiplier;
            Acceleration       = copy.Acceleration;
            Friction           = copy.Friction;
            Direction          = copy.Direction;
            DirectionRange     = copy.DirectionRange;
            Life               = copy.Life;
            LifeRange          = copy.LifeRange;
            Size               = copy.Size;
            SizeRange          = copy.SizeRange;
            Rotated            = copy.Rotated;
            RandomRotate       = copy.RandomRotate;
            ScaleOut           = copy.ScaleOut;
            UseActualDeltaTime = copy.UseActualDeltaTime;

            AllTypes.Add(this);
        }
예제 #10
0
 public void Emit(ParticleType type, Vector2 position)
 {
     type.Create(ref particles[nextSlot], position);
     nextSlot = (nextSlot + 1) % particles.Length;
 }
예제 #11
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;
 }
예제 #12
0
 public void Emit(ParticleType type, int amount, Vector2 position, Vector2 positionRange, float direction)
 {
     for (int i = 0; i < amount; i++)
         Emit(type, Calc.Random.Range(position - positionRange, positionRange * 2), direction);
 }
예제 #13
0
 public void Emit(ParticleType type, Vector2 position, float direction)
 {
     type.Create(ref particles[nextSlot], position, direction);
     nextSlot = (nextSlot + 1) % particles.Length;
 }
예제 #14
0
 public void Emit(ParticleType type, Vector2 position, float direction)
 {
     particles[GetParticleSlot()] = type.Create(position, direction);
 }
 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;
 }