Barotrauma Client Doc
Barotrauma.Particles.ParticleManager Class Reference

Public Member Functions

 ParticleManager (Camera cam)
 
Particle CreateParticle (string prefabName, Vector2 position, float angle, float speed, Hull hullGuess=null, float collisionIgnoreTimer=0f, Tuple< Vector2, Vector2 > tracerPoints=null)
 
Particle CreateParticle (string prefabName, Vector2 position, Vector2 velocity, float rotation=0.0f, Hull hullGuess=null, float collisionIgnoreTimer=0f, Tuple< Vector2, Vector2 > tracerPoints=null)
 
Particle CreateParticle (ParticlePrefab prefab, Vector2 position, Vector2 velocity, float rotation=0.0f, Hull hullGuess=null, bool drawOnTop=false, float collisionIgnoreTimer=0f, float lifeTimeMultiplier=1f, Tuple< Vector2, Vector2 > tracerPoints=null)
 
void RemoveParticle (Particle particle)
 
void Update (float deltaTime)
 
void UpdateTransforms ()
 
Dictionary< ParticlePrefab, int > CountActiveParticles ()
 
void Draw (SpriteBatch spriteBatch, bool inWater, bool? inSub, ParticleBlendState blendState)
 
void ClearParticles ()
 
void RemoveByPrefab (ParticlePrefab prefab)
 

Static Public Member Functions

static List< ParticlePrefabGetPrefabList ()
 
static ParticlePrefab FindPrefab (string prefabName)
 

Properties

int ParticleCount [get]
 
int MaxParticles [get, set]
 
Camera Camera [get, set]
 

Detailed Description

Definition at line 14 of file ParticleManager.cs.

Constructor & Destructor Documentation

◆ ParticleManager()

Barotrauma.Particles.ParticleManager.ParticleManager ( Camera  cam)

Definition at line 70 of file ParticleManager.cs.

Member Function Documentation

◆ ClearParticles()

void Barotrauma.Particles.ParticleManager.ClearParticles ( )

Definition at line 238 of file ParticleManager.cs.

◆ CountActiveParticles()

Dictionary<ParticlePrefab, int> Barotrauma.Particles.ParticleManager.CountActiveParticles ( )

Definition at line 205 of file ParticleManager.cs.

◆ CreateParticle() [1/3]

Particle Barotrauma.Particles.ParticleManager.CreateParticle ( ParticlePrefab  prefab,
Vector2  position,
Vector2  velocity,
float  rotation = 0.0f,
Hull  hullGuess = null,
bool  drawOnTop = false,
float  collisionIgnoreTimer = 0f,
float  lifeTimeMultiplier = 1f,
Tuple< Vector2, Vector2 >  tracerPoints = null 
)

Definition at line 94 of file ParticleManager.cs.

◆ CreateParticle() [2/3]

Particle Barotrauma.Particles.ParticleManager.CreateParticle ( string  prefabName,
Vector2  position,
float  angle,
float  speed,
Hull  hullGuess = null,
float  collisionIgnoreTimer = 0f,
Tuple< Vector2, Vector2 >  tracerPoints = null 
)

Definition at line 77 of file ParticleManager.cs.

◆ CreateParticle() [3/3]

Particle Barotrauma.Particles.ParticleManager.CreateParticle ( string  prefabName,
Vector2  position,
Vector2  velocity,
float  rotation = 0.0f,
Hull  hullGuess = null,
float  collisionIgnoreTimer = 0f,
Tuple< Vector2, Vector2 >  tracerPoints = null 
)

Definition at line 82 of file ParticleManager.cs.

◆ Draw()

void Barotrauma.Particles.ParticleManager.Draw ( SpriteBatch  spriteBatch,
bool  inWater,
bool?  inSub,
ParticleBlendState  blendState 
)

Definition at line 216 of file ParticleManager.cs.

◆ FindPrefab()

static ParticlePrefab Barotrauma.Particles.ParticleManager.FindPrefab ( string  prefabName)
static

Definition at line 149 of file ParticleManager.cs.

◆ GetPrefabList()

static List<ParticlePrefab> Barotrauma.Particles.ParticleManager.GetPrefabList ( )
static

Definition at line 144 of file ParticleManager.cs.

◆ RemoveByPrefab()

void Barotrauma.Particles.ParticleManager.RemoveByPrefab ( ParticlePrefab  prefab)

Definition at line 244 of file ParticleManager.cs.

◆ RemoveParticle()

void Barotrauma.Particles.ParticleManager.RemoveParticle ( Particle  particle)

Definition at line 164 of file ParticleManager.cs.

◆ Update()

void Barotrauma.Particles.ParticleManager.Update ( float  deltaTime)

Definition at line 176 of file ParticleManager.cs.

◆ UpdateTransforms()

void Barotrauma.Particles.ParticleManager.UpdateTransforms ( )

Definition at line 197 of file ParticleManager.cs.

Property Documentation

◆ Camera

Camera Barotrauma.Particles.ParticleManager.Camera
getset

Definition at line 64 of file ParticleManager.cs.

◆ MaxParticles

int Barotrauma.Particles.ParticleManager.MaxParticles
getset

Definition at line 25 of file ParticleManager.cs.

◆ ParticleCount

int Barotrauma.Particles.ParticleManager.ParticleCount
get

Definition at line 19 of file ParticleManager.cs.