Mountain  1.0.0
Simple C++ 2D Game Framework
Mountain::ParticleSystem Class Reference
+ Collaboration diagram for Mountain::ParticleSystem:

Public Member Functions

MOUNTAIN_API ParticleSystem (uint32_t maxParticles)
 
MOUNTAIN_API void Update ()
 
MOUNTAIN_API void Render ()
 
MOUNTAIN_API void RenderImGui ()
 
MOUNTAIN_API void RenderDebug ()
 
MOUNTAIN_API void TogglePlay ()
 
MOUNTAIN_API void Restart ()
 
MOUNTAIN_API void Stop ()
 
MOUNTAIN_API uint32_t GetCurrentParticles ()
 Get the current alive particle count. This can vary a lot from frame to frame because we count the particles on the CPU from the GPU memory.
 
MOUNTAIN_API uint32_t GetMaxParticles () const
 
MOUNTAIN_API void SetMaxParticles (uint32_t newMaxParticles)
 Set the new maximum particle count. More...
 
MOUNTAIN_API bool_t IsPlaying () const
 

Public Attributes

Vector2 position
 
float_t rotation
 
float_t duration = 5.f
 
bool_t looping = true
 
float_t startDelay
 
bool_t useUnscaledDeltaTime = false
 
float_t emissionRateOverTime = 10.f
 
float_t emissionRateOverDistance = 0.f
 
List< ParticleSystemBurstemissionBursts
 
float_t particleLifetime = 5.f
 
float_t particleSpeed = 5.f
 
Color particleStartColor = Color::White()
 
List< std::shared_ptr< ParticleSystemModules::Base > > modules
 
ParticleSystemModules::Types enabledModules = ParticleSystemModules::Types::Default
 

Detailed Description

Definition at line 34 of file particle_system.hpp.

Member Function Documentation

◆ SetMaxParticles()

MOUNTAIN_API void Mountain::ParticleSystem::SetMaxParticles ( uint32_t  newMaxParticles)

Set the new maximum particle count.

Warning
This is a very heavy operation, avoid doing this each frame

The documentation for this class was generated from the following file: