File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -1476,15 +1476,19 @@ cc.ParticleSystem = cc.Node.extend(/** @lends cc.ParticleSystem# */{
14761476 * Add a particle to the emitter
14771477 * @return {Boolean }
14781478 */
1479- addParticle :function ( ) {
1479+ addParticle : function ( ) {
14801480 if ( this . isFull ( ) )
14811481 return false ;
14821482 var particle , particles = this . _particles ;
1483- if ( cc . renderContextType === cc . CANVAS && this . _particleCount < particles . length ) {
1484- particle = particles [ this . _particleCount ] ;
1485- } else {
1486- particle = new cc . Particle ( ) ;
1487- particles . push ( particle ) ;
1483+ if ( cc . renderContextType === cc . CANVAS ) {
1484+ if ( this . _particleCount < particles . length ) {
1485+ particle = particles [ this . _particleCount ] ;
1486+ } else {
1487+ particle = new cc . Particle ( ) ;
1488+ particles . push ( particle ) ;
1489+ }
1490+ } else {
1491+ particle = particles [ this . _particleCount ] ;
14881492 }
14891493 this . initParticle ( particle ) ;
14901494 ++ this . _particleCount ;
You can’t perform that action at this time.
0 commit comments