ParticleSystem
From Crumbled World Wiki
Inheritance
Static functions
| return | function | description |
|---|---|---|
| ParticleSystem | new(table dataTab) | Create a new Instance of the the ParticleSystem |
Functions
| return | function | description |
|---|---|---|
| update() | ||
| setLine(Vec3 startPos, Vec3 endPos, float timePos) | ||
| bool | isRendering() | |
| setScale(float scale) | Scales the particle effect 1.0 is default size | |
| setEmitterPos(Vec3 pos) | Where the particles will spawn. This does not effect the already spawned particles | |
| setEmitterPos(Vec3 pos, Vec3 atVec) | Where the particles will spawn and ad a target vector for vector based particle effects. This does not effect the already spawned particles | |
| setEmitterLine(Line3D line) | Particles will spawn equaly over the line | |
| setEmitterLine(Line3D line, Vec3 atVec) | ||
| setAtVector(Vec3 atVec) | ||
| setFullAlphaOnRange(float range) | ||
| ageParticles(float time) | Ages the particle system by a set amount of time | |
| activate(Vec3 pos) | ||
| activate(Vec3 pos, Vec3 atVec) | ||
| deactivate() | ||
| deactivate(double duration) | Will deactivate the partices. but they will fade out during a set time. | |
| bool | isActive() | Returns true if any particle is still active, else it return false. |
| setScale(float scale) | Set the scale of the particle effect from 0.0 to infinity. | |
| setSpawnRadius(float radius) | Set the radius where particles can spawn, from 0.0 to infinity. | |
| setSpawnRate(float rate) | Set the percentage of how many particles will spawn, where 1.0 is 100%. the math is rate * default spawn rate | |
| setProportionRightForNoneWallboardParticle(float proportion) | how wide the particle should be if pixel wise it is 10px,100px then the proportion should be 10 to keep the shape | |
| resetSpawnTimer() |