Example #1
0
 public ParticleTrailComponent(int amount, float frequency, Color color, ParticleGravityStatus gravity)
 {
     Amount    = amount;
     Frequency = frequency;
     Color     = color;
     Gravity   = gravity;
     LastTime  = -1;
 }
Example #2
0
 public ParticleTrailComponent(SerializationInfo info, StreamingContext context)
 {
     Amount    = info.GetValue(nameof(Amount), Amount);
     Frequency = info.GetValue(nameof(Frequency), Frequency);
     Color     = info.GetValue(nameof(Color), Color);
     Gravity   = info.GetValue(nameof(Gravity), Gravity);
     LastTime  = info.GetValue(nameof(LastTime), LastTime);
 }
Example #3
0
        public void EmitParticles(Vector3 position, Color color, int amount, ParticleGravityStatus status)
        {
            ParticleSystem ps;

            switch (status)
            {
            default:
            case ParticleGravityStatus.Default:
                ps = _gravityParticles;
                break;

            case ParticleGravityStatus.Anti:
                ps = _antiGravityParticles;
                break;

            case ParticleGravityStatus.None:
                ps = _noGravityParticles;
                break;
            }
            EmitParticles(position, color, amount, ps);
        }