Jump to content

multiple particle and performance, optimization ?


espace
 Share

Recommended Posts

hi,

my goal is :

have multiple explosion and have no lag

so i use a particle emitterbut after a certain delay, a lag appears.

what the best solution to avoid that ?

thanks for yours suggestions.

 

	character.prototype.explode=function(){
		this.particle = game.add.emitter(this.cible.x,this.cible.y,200)
		this.particle.makeParticles("rect")
		this.particle.minParticleSpeed.setTo(-600,-600)
		this.particle.maxParticleSpeed.setTo(800,800)
		this.particle.setAlpha(.8, .6)
		this.particle.minParticleScale = .2
		this.particle.maxParticleScale = .5
		this.particle.minRotation = 0
		this.particle.maxRotation = 0
		this.particle.on=false
		this.particle.start(true,3900,null,20)
	}

		game.time.events.loop( 500,this.explode,this )

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...