Wasabi
|
#include <WParticles.hpp>
Public Member Functions | |
WParticlesManager (class Wasabi *const app) | |
WError | Load () |
class WEffect * | CreateParticlesEffect (W_DEFAULT_PARTICLE_EFFECT_TYPE type) const |
WParticles * | CreateParticles (W_DEFAULT_PARTICLE_EFFECT_TYPE type, uint32_t maxParticles=5000, WParticlesBehavior *behavior=nullptr, uint32_t ID=0) const |
![]() | |
WManager (class Wasabi *const a) | |
bool | RegisterChangeCallback (std::string name, std::function< void(WParticles *, bool)> callback) |
void | RemoveChangeCallback (std::string name) |
void | AddEntity (WParticles *entity) |
bool | RemoveEntity (WParticles *entity) |
void | OnEntityNameChanged (WParticles *entity, std::string oldName) |
virtual void | Init () |
WParticles * | GetEntity (uint32_t ID) const |
WParticles * | GetEntity (std::string name) const |
WParticles * | GetEntityByIndex (uint32_t index) const |
uint32_t | GetEntitiesCount (void) const |
Friends | |
class | WParticles |
Additional Inherited Members | |
![]() | |
class Wasabi *const | m_app |
![]() | |
std::vector< WParticles * > | m_entities [W_HASHTABLESIZE] |
std::unordered_map< std::string, WParticles * > | m_entitiesByName |
Manager class for WParticles.
WParticles* WParticlesManager::CreateParticles | ( | W_DEFAULT_PARTICLE_EFFECT_TYPE | type, |
uint32_t | maxParticles = 5000 , |
||
WParticlesBehavior * | behavior = nullptr , |
||
uint32_t | ID = 0 |
||
) | const |
Allocates and initializes a new particles system.
type | Type of the new particles system |
maxParticles | Maximum number of particles that the system can render simultaneously. Pass 0 to free resources and uninitialize the system |
behavior | Behavior object for this system, pass nullptr to use WDefaultParticleBehavior |
ID | ID of the new particles system |
class WEffect* WParticlesManager::CreateParticlesEffect | ( | W_DEFAULT_PARTICLE_EFFECT_TYPE | type | ) | const |
Creates a WEffect that can be used to render particles
WError WParticlesManager::Load | ( | ) |
Loads the manager.