CParticleSystem.Builder
Fluent builder for spawning a CParticleSystem entity.
public sealed class Builder
Namespace: DeadworksManaged.Api
Source: Entities/CParticleSystem.cs#L40
Methods
CParticleSystem.Builder.AtPosition()
Sets the world-space spawn position.
Signature
public Builder AtPosition(Vector3 position)
public Builder AtPosition(float x, float y, float z)
Source: Entities/CParticleSystem.cs#L55, Entities/CParticleSystem.cs#L58
CParticleSystem.Builder.WithAngles()
Sets the world-space spawn angles (pitch, yaw, roll in degrees).
Signature
public Builder WithAngles(Vector3 angles)
Source: Entities/CParticleSystem.cs#L61
CParticleSystem.Builder.StartActive()
Controls whether the effect starts playing immediately on spawn. Defaults to true.
Signature
public Builder StartActive(bool active)
Source: Entities/CParticleSystem.cs#L64
CParticleSystem.Builder.WithTint()
Applies an RGBA tint color to the effect via the specified control point.
Signature
public Builder WithTint(Color color, int tintCP = 0)
Parameters
color: The tint color.tintCP: The control point index to receive the tint (default 0).
Source: Entities/CParticleSystem.cs#L69
CParticleSystem.Builder.WithDataCP()
Sets a data control point value on the effect.
Signature
public Builder WithDataCP(int cp, Vector3 value)
Parameters
cp: The control point index.value: The 3D value to assign to the control point.
Source: Entities/CParticleSystem.cs#L78
CParticleSystem.Builder.WithControlPoint()
Binds an entity to a numbered control point so the effect can follow it.
Signature
public Builder WithControlPoint(int index, CBaseEntity entity)
Parameters
index: The control point index.entity: The entity to bind.
Source: Entities/CParticleSystem.cs#L87
CParticleSystem.Builder.AttachedTo()
Parents the spawned particle system to another entity (applied after spawn).
Signature
public Builder AttachedTo(CBaseEntity parent)
Parameters
parent: The entity to parent to.
Source: Entities/CParticleSystem.cs#L94
CParticleSystem.Builder.Spawn()
Creates the info_particle_system entity via CEntityKeyValues so the engine properly resolves the particle resource handle (m_iEffectIndex).
Signature
public CParticleSystem? Spawn()
Returns
The spawned CParticleSystem, or null if entity creation failed.
Source: Entities/CParticleSystem.cs#L101