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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.