Exemplo n.º 1
0
 public void Load(ParticleSettings loadFrom)
 {
     Acceleration = loadFrom.Acceleration;
     AccelerationVariance = loadFrom.AccelerationVariance;
     ColorRange = loadFrom.ColorRange;
     ColorVariance = loadFrom.ColorVariance;
     EmissionOffset = loadFrom.EmissionOffset;
     EmissionRadiusRange = loadFrom.EmissionRadiusRange;
     EmitRate = loadFrom.EmitRate;
     EmitterPosition = loadFrom.EmitterPosition;
     Lifetime = loadFrom.Lifetime;
     LifetimeVariance = loadFrom.LifetimeVariance;
     MaximumParticleCount = loadFrom.MaximumParticleCount;
     RadialAcceleration = loadFrom.RadialAcceleration;
     RadialAccelerationVariance = loadFrom.RadialAccelerationVariance;
     RadialVelocity = loadFrom.RadialVelocity;
     RadialVelocityVariance = loadFrom.RadialVelocityVariance;
     SizeRange = loadFrom.SizeRange;
     SizeVariance = loadFrom.SizeVariance;
     SpinVelocity = loadFrom.SpinVelocity;
     SpinVelocityVariance = loadFrom.SpinVelocityVariance;
     Sprite = loadFrom.Sprite;
     TangentialAcceleration = loadFrom.TangentialAcceleration;
     TangentialAccelerationVariance = loadFrom.TangentialAccelerationVariance;
     TangentialVelocity = loadFrom.TangentialVelocity;
     TangentialVelocityVariance = loadFrom.TangentialVelocityVariance;
     Velocity = loadFrom.Velocity;
     VelocityVariance = loadFrom.VelocityVariance;
 }
Exemplo n.º 2
0
 public void Load(ParticleSettings loadFrom)
 {
     Acceleration               = loadFrom.Acceleration;
     AccelerationVariance       = loadFrom.AccelerationVariance;
     ColorRange                 = loadFrom.ColorRange;
     ColorVariance              = loadFrom.ColorVariance;
     EmissionOffset             = loadFrom.EmissionOffset;
     EmissionRadiusRange        = loadFrom.EmissionRadiusRange;
     EmitRate                   = loadFrom.EmitRate;
     EmitterPosition            = loadFrom.EmitterPosition;
     Lifetime                   = loadFrom.Lifetime;
     LifetimeVariance           = loadFrom.LifetimeVariance;
     MaximumParticleCount       = loadFrom.MaximumParticleCount;
     RadialAcceleration         = loadFrom.RadialAcceleration;
     RadialAccelerationVariance = loadFrom.RadialAccelerationVariance;
     RadialVelocity             = loadFrom.RadialVelocity;
     RadialVelocityVariance     = loadFrom.RadialVelocityVariance;
     SizeRange                  = loadFrom.SizeRange;
     SizeVariance               = loadFrom.SizeVariance;
     SpinVelocity               = loadFrom.SpinVelocity;
     SpinVelocityVariance       = loadFrom.SpinVelocityVariance;
     Sprite = loadFrom.Sprite;
     TangentialAcceleration         = loadFrom.TangentialAcceleration;
     TangentialAccelerationVariance = loadFrom.TangentialAccelerationVariance;
     TangentialVelocity             = loadFrom.TangentialVelocity;
     TangentialVelocityVariance     = loadFrom.TangentialVelocityVariance;
     Velocity         = loadFrom.Velocity;
     VelocityVariance = loadFrom.VelocityVariance;
 }
Exemplo n.º 3
0
 public ParticleSystem(ParticleSettings settings, Vector2f position)
 {
     LoadParticleSettings(settings);
     EmitterPosition = position;
 }
Exemplo n.º 4
0
        /// <summary>
        /// Copy given ParticleSettings into this emitter.
        /// </summary>
        /// <remarks>
        /// Applies the settings of the given ParticleSettings to this emitter.
        /// </remarks>
        /// <param name="toPosition"></param>
        public void LoadParticleSettings(ParticleSettings settings)
        {
            if (settings == null) return;

            this.Acceleration = settings.Acceleration;
            this.AccelerationVariance = settings.AccelerationVariance;

            //I hope this is correct.
            this.ColorRange = new SS14.Shared.Utility.Range<Vector4f>(
                new Vector4f(settings.ColorRange.Start.A, settings.ColorRange.Start.R, settings.ColorRange.Start.G, settings.ColorRange.Start.B),
                new Vector4f(settings.ColorRange.End.A, settings.ColorRange.End.R, settings.ColorRange.End.G, settings.ColorRange.End.B));

            this.ColorVariance = settings.ColorVariance;
            this.EmissionOffset = settings.EmissionOffset;
            this.EmissionRadiusRange = new SS14.Shared.Utility.Range<float>(settings.EmissionRadiusRange.X, settings.EmissionRadiusRange.Y);
            this.EmitterPosition = settings.EmitterPosition;
            this.EmitRate = settings.EmitRate;
            this.Lifetime = settings.Lifetime;
            this.LifetimeVariance = settings.LifetimeVariance;
            this.MaximumParticleCount = settings.MaximumParticleCount;
            this.ParticleSprite = IoCManager.Resolve<IResourceManager>().GetSprite(settings.Sprite);
            this.RadialAcceleration = settings.RadialAcceleration;
            this.RadialAccelerationVariance = settings.RadialAccelerationVariance;
            this.RadialVelocity = settings.RadialVelocity;
            this.RadialVelocityVariance = settings.RadialVelocityVariance;
            this.SizeRange = new SS14.Shared.Utility.Range<float>(settings.SizeRange.X, settings.SizeRange.Y);
            this.SizeVariance = settings.SizeVariance;
            this.SpinVelocity = new SS14.Shared.Utility.Range<float>(settings.SpinVelocity.X, settings.SpinVelocity.Y);
            this.SpinVelocityVariance = settings.SpinVelocityVariance;
            this.TangentialAcceleration = settings.TangentialAcceleration;
            this.TangentialAccelerationVariance = settings.TangentialAccelerationVariance;
            this.TangentialVelocity = settings.TangentialVelocity;
            this.TangentialVelocityVariance = settings.TangentialVelocityVariance;
            this.Velocity = settings.Velocity;
            this.VelocityVariance = settings.VelocityVariance;
        }
 public ParticleConfigurator()
 {
     InitializeComponent();
     ParticleSettings = new ParticleSettings();
     InitializeBindings();
 }