Visual Effects 10: Making it snow

In this lesson we are taught how to make snow. After I created my own solution I didn’t see the snow so I reset everything and did the full solution and this time it didn’t even load the game.

Finally I tricked the boolean statement to force a true statement and that made my snow work.

My question is, where do I set gameState.emitter to true (not undefined) so that my program works as intended.

if (5<10) { // gameState.emitter) {

  // Update this part of the code to set wind and amount of snow!

  gameState.emitter = gameState.particles.createEmitter({

  x: {min: 0, max: config.width * 2 },

  y: -5,

  lifespan: 2000,

  speedX: { min:-5, max: -200 },

  speedY: { min: 200, max: 400 },

  scale: { start: 0.6, end: 0 },

  quantity: 10,

  blendMode: 'ADD'




you are supposed to create the gameState.emitter inside of a method call “createSnow()” and not inside an if…
and then call createSnow inside the create() method like this this.createSnow();