Sign in to follow this  
rickbross

Emitter only spits out the same four sprites

Recommended Posts

So my particle emitter is only sending out the same 4 sprites every time. Which 4 out of the twenty changes each time I reload the app, but it only scrolls through the four.

 

Any ideas?

 

http://w1nz.co/scratcher-menu/

this.emitter = this.add.emitter(this.world.centerX, 1000, 20);this.emitter.width = this.world.width+50;// this.emitter.angle = 30; // uncomment to set an angle for the rain.this.emitter.gravity = -1;this.emitter.makeParticles(iconsBlurred);this.emitter.minParticleScale = 0.4;this.emitter.maxParticleScale = 1;this.emitter.alpha = 0.45;this.emitter.setYSpeed(-50,-70);this.emitter.setXSpeed(0,0);this.emitter.minRotation = 0;this.emitter.maxRotation = 0;this.emitter.start(false, 9500, 3000);

Share this post


Link to post
Share on other sites

Hey Rick,

I am pretty new to Phaser myself, but it looks like you are calling this.state.start('MainMenu') inside the Preloader's "create" method in addition to the "gameLoaded" method. I assume it's loading the MainMenu scene before all of the assets are loaded. Try removing that line and see what happens.

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.