particle system abstraction to support multiple particle systems
This commit is contained in:
parent
82eefebb7c
commit
705614909b
1 changed files with 20 additions and 0 deletions
20
src/VFX.cs
20
src/VFX.cs
|
@ -67,5 +67,25 @@ public class Particle
|
|||
this.vel = Vec3.Zero;
|
||||
this.ori = Quat.Identity;
|
||||
this.scl = 0.0f;
|
||||
|
||||
public class ParticleSystem
|
||||
{
|
||||
public Particle[] particles;
|
||||
public int count;
|
||||
public int index;
|
||||
|
||||
public ParticleSystem(int count)
|
||||
{
|
||||
this.particles = new Particle[count];
|
||||
this.count = count;
|
||||
this.index = 0;
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
for (int i = 0; i < particles.Length; i++)
|
||||
{
|
||||
particles[i] = new();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue