|
NWengine 0.9
|
Represents a particle system component that can be attached to a game object. More...
#include <Components.h>
Public Member Functions | |
| ParticleSystem (GameObject *attachedObj) | |
| void | Update () |
| Updates the particle system. | |
| void | UpdateParticle (int index) |
| Updates a particle. | |
| void | Emit () |
| Emits particles. | |
| void | Init () |
| Initializes the particle system. | |
| void | InitParticle () |
| Initializes a particle. | |
| int | Serialize (std::fstream *data, int offset) override |
| Serializes the particle system. | |
| int | Deserialize (std::fstream *data, int offset) override |
| Deserializes the particle system. | |
Public Member Functions inherited from GameComponent | |
| virtual void | Start () |
| Start the game component. | |
| virtual void | SetGameObject (void *go) |
| Set the GameObject associated with the game component. | |
| virtual void * | GetGameObject () |
| Get the GameObject associated with the game component. | |
| virtual | ~GameComponent () |
| Destructor for the game component. | |
Public Member Functions inherited from Serialized | |
| Serialized () | |
| Default constructor for Serialized class. | |
Static Public Member Functions | |
| static std::string | GetType () |
Static Public Member Functions inherited from GameComponent | |
| static std::string | GetType () |
| Get the type of the game component. | |
Public Attributes | |
| GameObject * | attachedObj = nullptr |
| bool | isActive = true |
| std::deque< Particle > | pool |
| std::deque< int > | disabled |
| std::deque< int > | enabled |
| int | maxParticles = 100 |
| double | emissionFrequency = 1.0 |
| uint16 | emissionQuantity = 1 |
| int | initNum = 5 |
| ParticleProperties | prop |
| bool | recycle = 1 |
| std::string | shader = SHADER_PARTICLES_DEFAULT |
| std::string | texture = TEXTURE_PARTICLES_DEFAULT |
Static Public Attributes | |
| static std::map< GameObject *, ParticleSystem > | componentList |
Represents a particle system component that can be attached to a game object.
Represents a particle system.
Deserializes the particle system.
| data | The data stream to deserialize from. |
| offset | The offset in the data stream. |
Reimplemented from Serialized.
Serializes the particle system.
| data | The data stream to serialize to. |
| offset | The offset in the data stream. |
Reimplemented from Serialized.
|
virtual |
Updates the particle system.
Reimplemented from GameComponent.
Updates a particle.
| index | The index of the particle to update. |
| GameObject* ParticleSystem::attachedObj = nullptr |
The attached game object
|
static |
The list of particle systems
| std::deque<int> ParticleSystem::disabled |
The disabled particles
| double ParticleSystem::emissionFrequency = 1.0 |
The emission frequency
| uint16 ParticleSystem::emissionQuantity = 1 |
The emission quantity
| std::deque<int> ParticleSystem::enabled |
The enabled particles
| int ParticleSystem::initNum = 5 |
The initial number of particles
| int ParticleSystem::maxParticles = 100 |
The maximum number of particles
| std::deque<Particle> ParticleSystem::pool |
The pool of particles
| ParticleProperties ParticleSystem::prop |
The properties of the particle system
| bool ParticleSystem::recycle = 1 |
Indicates if particles should be recycled
| std::string ParticleSystem::shader = SHADER_PARTICLES_DEFAULT |
The shader for the particle system
| std::string ParticleSystem::texture = TEXTURE_PARTICLES_DEFAULT |
The texture for the particle system