ParticleEffectclass
Defines and holds particles. This is the core of the particle system.
Constructors1
Showing 1 constructors
public ParticleEffect()
No results match this filter.
Methods7
Showing 7 methods
public void Clear()
void—public void ResetEmitters()
void—public void Step(float timeDelta)
| Parameter | Type | Description |
|---|---|---|
| timeDelta | float | — |
void—No results match this filter.
Properties66
Showing 66 properties
public Sandbox.ParticleFloat Sandbox.ParticleEffect.Alpha { get; set; }
The alpha transparency of particles.
public bool Sandbox.ParticleEffect.ApplyAlpha { get; set; }
Enables or disables alpha application for particles.
bool—public bool Sandbox.ParticleEffect.ApplyColor { get; set; }
Enables or disables color application for particles.
bool—public bool Sandbox.ParticleEffect.ApplyRotation { get; set; }
Enables or disables rotation for particles.
bool—public bool Sandbox.ParticleEffect.ApplyShape { get; set; }
Enables or disables shape application for particles.
bool—public Sandbox.ParticleFloat Sandbox.ParticleEffect.Bounce { get; set; }
The bounce factor applied to particles upon collision.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.Brightness { get; set; }
The brightness multiplier applied to particles.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.Bumpiness { get; set; }
The bumpiness factor applied to particles upon collision.
public bool Sandbox.ParticleEffect.Collision { get; set; }
Enables or disables collision behavior for particles.
bool—public Sandbox.TagSet Sandbox.ParticleEffect.CollisionIgnore { get; set; }
The set of tags to ignore during collision detection.
public System.Collections.Generic.List`1<Sandbox.GameObject> Sandbox.ParticleEffect.CollisionPrefab { get; set; }
Will choose a random prefab to spawn from this list.
public bool Sandbox.ParticleEffect.CollisionPrefabAlign { get; set; }
When true the collision prefab will be aligned with the surface it collides with.
bool—public Sandbox.ParticleFloat Sandbox.ParticleEffect.CollisionPrefabChance { get; set; }
If 1 then we'll always spawn a prefab. If 0.5 then we'll spawn a prefab 50% of the time.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.CollisionPrefabRotation { get; set; }
We will by default align to the particle's angle, but we can also randomize that.
public float Sandbox.ParticleEffect.CollisionRadius { get; set; }
The radius used for collision detection.
float—public virtual int Sandbox.ParticleEffect.ComponentVersion { get; set; }
int—public Sandbox.ParticleVector3 Sandbox.ParticleEffect.ConstantMovement { get; set; }
Move this delta constantly. Ignores velocity, collisions and drag.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.Damping { get; set; }
The damping factor applied to particle velocity over time. This reduces the velocity of particles, simulating resistance or drag.
public System.Collections.Generic.List`1<Sandbox.Particle> Sandbox.ParticleEffect.DelayedParticles { get; set; }
Delayed particles in the effect. Delayed particles are those that have been emitted but are waiting to be activated based on their start delay.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.DieOnCollisionChance { get; set; }
The chance that a particle will die upon collision.
public System.Collections.Generic.List`1<Sandbox.GameObject> Sandbox.ParticleEffect.FollowerPrefab { get; set; }
Will choose a random prefab to spawn from this list.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.FollowerPrefabChance { get; set; }
If 1 then we'll always spawn a prefab. If 0.5 then we'll spawn a prefab 50% of the time.
public bool Sandbox.ParticleEffect.FollowerPrefabKill { get; set; }
When true the prefab will be destroyed at the end of the particle's life.
bool—public bool Sandbox.ParticleEffect.Force { get; set; }
Enables or disables the application of forces to particles.
bool—public Vector3 Sandbox.ParticleEffect.ForceDirection { get; set; }
The direction of the force applied to particles.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.ForceScale { get; set; }
The scale of the force applied to each particle. This multiplier determines the intensity of the force applied to particles.
public Sandbox.ParticleEffect.SimulationSpace Sandbox.ParticleEffect.ForceSpace { get; set; }
The simulation space in which forces are applied. Forces can be applied in either local space (relative to the emitter) or world space.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.Friction { get; set; }
The friction factor applied to particles upon collision.
public Sandbox.ParticleGradient Sandbox.ParticleEffect.Gradient { get; set; }
The gradient used to color particles over their lifetime.
public Sandbox.ParticleVector3 Sandbox.ParticleEffect.InitialVelocity { get; set; }
The initial velocity of the particle when it is created. This is applied before any forces are applied.
public bool Sandbox.ParticleEffect.IsFull { get; set; }
Whether the particle effect has reached its maximum capacity. This is determined by comparing the total particle count to the `Sandbox.ParticleEffect.MaxParticles` property.
bool—public Sandbox.ParticleFloat Sandbox.ParticleEffect.Lifetime { get; set; }
The lifetime of each particle, in seconds.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.LocalSpace { get; set; }
When 1 particles will be moved in local space relative to the emitter GameObject's transform. This allows particles to be emitted in a local space, like a fire effect that moves with the player, but the particles can slowly move to world space.
public int Sandbox.ParticleEffect.MaxParticles { get; set; }
The maximum number of particles that can exist in this effect at once.
int—public float Sandbox.ParticleEffect.MaxParticleSize { get; set; }
The size of the largest particle in the effect. This is determined by the maximum scale of any particle along its x, y, or z axis.
float—public System.Action`1<Sandbox.Particle> Sandbox.ParticleEffect.OnParticleCreated { get; set; }
Called any time a particle is created.
public System.Action`1<Sandbox.Particle> Sandbox.ParticleEffect.OnParticleDestroyed { get; set; }
Called any time a particle is destroyed.
public System.Action`1<float> Sandbox.ParticleEffect.OnPostStep { get; set; }
Called after the particles are stepped. This allows custom logic to be executed after the simulation advances.
Action<float>—public System.Action`1<float> Sandbox.ParticleEffect.OnPreStep { get; set; }
Called before the particles are stepped. This allows custom logic to be executed before the simulation advances.
Action<float>—public System.Action`2<Sandbox.Particle,float> Sandbox.ParticleEffect.OnStep { get; set; }
Called after each particle is stepped. This provides an opportunity to modify individual particles during the simulation.
public Sandbox.ParticleVector3 Sandbox.ParticleEffect.OrbitalForce { get; set; }
The orbital force applied to particles, causing them to rotate around a point.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.OrbitalPull { get; set; }
The pull strength of the orbital force, drawing particles closer to the center.
public BBox Sandbox.ParticleEffect.ParticleBounds { get; set; }
The bounding box that encompasses all active particles. This is useful for determining the spatial extent of the particle effect.
public int Sandbox.ParticleEffect.ParticleCount { get; set; }
The total number of particles in the effect, including both active and delayed particles.
int—public System.Collections.Generic.List`1<Sandbox.Particle> Sandbox.ParticleEffect.Particles { get; set; }
Active particles in the effect. Active particles are those currently being simulated and rendered.
public bool Sandbox.ParticleEffect.Paused { get; set; }
Whether the particle simulation is currently paused. When paused, particles will not update their positions, velocities, or other properties.
bool—public Sandbox.ParticleFloat Sandbox.ParticleEffect.PerParticleTimeScale { get; set; }
Per-particle time scale multiplier. Allows each particle to have a unique simulation speed.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.Pitch { get; set; }
The pitch rotation of the particles.
public float Sandbox.ParticleEffect.PreWarm { get; set; }
How many seconds to pre-warm this effect by when creating.
float—public Sandbox.ParticleFloat Sandbox.ParticleEffect.PushStrength { get; set; }
The strength of the push force applied to particles upon collision.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.Roll { get; set; }
The roll rotation of the particles.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.Scale { get; set; }
The scale of particles.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.SequenceId { get; set; }
Which sequence to use.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.SequenceSpeed { get; set; }
Increment the sequence time by this much.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.SequenceTime { get; set; }
Allows control of the sequence time, which spans from 0 to 1 for one loop.
public bool Sandbox.ParticleEffect.SheetSequence { get; set; }
Enables or disables the use of a sheet sequence for particles.
bool—public bool Sandbox.ParticleEffect.SnapToFrame { get; set; }
When enabled, snap to the nearest whole frame instead of blending between frames.
bool—public Sandbox.ParticleEffect.SimulationSpace Sandbox.ParticleEffect.Space { get; set; }
Obsolete: Use LocalSpace instead
public Sandbox.ParticleFloat Sandbox.ParticleEffect.StartDelay { get; set; }
The delay before a particle starts after being emitted, in seconds.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.StartVelocity { get; set; }
Apply an element of random velocity to the particle when it is created, in a random direction.
public Sandbox.ParticleFloat Sandbox.ParticleEffect.Stretch { get; set; }
The stretch factor of particles, affecting their aspect ratio.
public float Sandbox.ParticleEffect.TimeScale { get; set; }
Scales the simulation time for this effect.
float—public Sandbox.ParticleEffect.TimingMode Sandbox.ParticleEffect.Timing { get; set; }
How time is updated for this effect.
public Color Sandbox.ParticleEffect.Tint { get; set; }
The tint color applied to particles.
public bool Sandbox.ParticleEffect.UsePrefabFeature { get; set; }
Enables or disables the use of prefabs for particles.
bool—public Sandbox.ParticleFloat Sandbox.ParticleEffect.Yaw { get; set; }
The yaw rotation of the particles.
No results match this filter.