espace

multiple particle and performance, optimization ?

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 )

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.