#include <JParticleEffect.h>
Public Member Functions | |
| JParticleEffect (JResourceManager *mgr) | |
| bool | Load (const char *filename) |
| void | Update (float dt) |
| void | Render () |
| bool | Done () |
| void | Start () |
| void | Stop () |
| void | SetParticleSystem (JParticleSystem *particleSys) |
| JParticleSystem * | GetParticleSystem () |
| void | SetPosition (float x, float y) |
| float | GetX () |
| float | GetY () |
| void | MoveTo (float x, float y) |
| JParticleEffect::JParticleEffect | ( | JResourceManager * | mgr | ) |
Constructor.
| mgr | - Resource manager for retrieving image quads for the particles. |
| bool JParticleEffect::Load | ( | const char * | filename | ) |
Load effect from file.
| filename | - Name of effect file. |
| void JParticleEffect::Update | ( | float | dt | ) |
Update particle effect.
| dt | - Time elapsed since last update (in second). |
| void JParticleEffect::Render | ( | ) |
Render particle effect.
| bool JParticleEffect::Done | ( | ) |
Check if the particle effect is finished.
| void JParticleEffect::Start | ( | ) |
Start playing.
| void JParticleEffect::Stop | ( | ) |
Stop playing.
| void JParticleEffect::SetParticleSystem | ( | JParticleSystem * | particleSys | ) |
Set particle system.
| particleSys | - Particle system. |
| JParticleSystem* JParticleEffect::GetParticleSystem | ( | ) |
Get particle system.
| void JParticleEffect::SetPosition | ( | float | x, | |
| float | y | |||
| ) |
Set position of the effect. New particles will be emitted from the new position but the existing active particles will not be affected.
| x | - X screen position. | |
| y | - Y screen position. |
| float JParticleEffect::GetX | ( | ) |
Get X position.
| float JParticleEffect::GetY | ( | ) |
Get Y position.
| void JParticleEffect::MoveTo | ( | float | x, | |
| float | y | |||
| ) |
Move the particle effect over to a new position. All the existing particles will be moved relatively.
| X | - X screen position. | |
| y | - Y screen position. |
1.5.3