GraphicParticleSystem
From Crumbled World Wiki
GraphicParticleSystemExampleCode
Inheritance
Static functions
| return | function | description |
|---|---|---|
| GraphicParticleSystem | new(int maxParticle, float particleLifeTime, bool loopParticleEffect) | Create a new Instance of the the GraphicParticleSystem |
| GraphicParticleSystem | new(int maxParticle, float particleLifeTime) | Create a new Instance of the the GraphicParticleSystem |
| GraphicParticleSystem | new(SceneNode graphicParticleSystem) | Create a Instanced copy of the graphic particle. All Particle system is renderd at the same time |
Functions
| return | function | description |
|---|---|---|
| activate() | ||
| deactivate() | ||
| int | getMaxParticles() | |
| addparticle(Vec3 startPosition, Vec3 velocity, Vec2 uvCoord, Vec4 startColor, Vec4 finalColor, float startSize, float finalSize, float timeOffset) | Add a particle to the particle system. timeOffset is a blue bettwen [0,1] | |
| setShader(Shader shader) | If you want to use a custom shader that is not the default "ParticleEffectBasic" | |
| setRenderBlendMode(GL_Blend sFactor, GL_Blend dFactor) | setBlendMode | |
| setCutOfTime(float cutOfTime) | Set the Cut of time. This should be a Value bettew 0 and particleLifeTime | |
| compile() | Compile the particle effect so it can be used be the graphic engine, before this is done this particle effect will not be visible. |