From 78138dc8e08cebff3b8630cab5b54951061844b8 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 7 Nov 2018 07:48:43 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E7=B2=92=E5=AD=90=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/Graphics/particles/je_particle_system.h | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'src/libjin/Graphics/particles/je_particle_system.h') diff --git a/src/libjin/Graphics/particles/je_particle_system.h b/src/libjin/Graphics/particles/je_particle_system.h index fa050f7..76d86fa 100644 --- a/src/libjin/Graphics/particles/je_particle_system.h +++ b/src/libjin/Graphics/particles/je_particle_system.h @@ -49,7 +49,12 @@ namespace JinEngine ~ParticleSystem(); /// - /// Render particle system's all particles. + /// Update particle system and all alive particles. + /// + void update(float sec); + + /// + /// Render particle system it self. /// void render(int x, int y, float sx = 1, float sy = 1, float r = 0, float ax = 0, float ay = 0); @@ -60,18 +65,15 @@ namespace JinEngine /// void setSprite(Sprite* sprite); - /// - /// Release particle and make it available in particle pool. - /// - void releaseParticle() - { - Particle*p = mParticlePool.New(); - } - private: // Disable default constructor. ParticleSystem(); + /// + /// Particle system definition. + /// + ParticleSystemDef mDef; + /// /// Sprite to be drawn. /// @@ -81,6 +83,10 @@ namespace JinEngine /// Particle emitter. /// ParticleEmitter mEmitter; + + /// + /// Particle pool. + /// ParticlePool mParticlePool; /// -- cgit v1.1-26-g67d0