Jump to content

Emitter only spits out the same four sprites


rickbross
 Share

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);
Link to comment
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.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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