Hello, to change the spritesheets of the snowflakes you just need to change the files in the setup:
extra: spritesheets: snowflakes: assets/ambient/snowflakes.png 17 17 snowflakes_large: assets/ambient/snowflakes_large.png 64 64
By changing the file names and frame size to the spritesheets you want, but keeping the keywords "snowflakes" and "snowflakes_large", you can use your own things.
If what you want to do is having more than one kind of "snow", and select it with parameters during the story, that would be something different, and you would need to code your own function (though it shouldn't be too hard if you base it on the current SNOW code).
For your second question, this is more tricky. It has to do with the order in which we add the display objects with Phaser. Since the snow emitters are created in the moment you call the ambient, it's on top of everything, including background, characters, etc. Phaser has groups of display objects, and in RenJS we have different groups to simulate layers, this layers are, from bottom to top:
- backgroundSprites
- behindCharacterSprites
- characterSprites
- cgsSprites
- GUI
The emitters, right now, are created outside of all this groups, so they are displayed on top of the GUI, if we want them behind the characters, then we have to add them to the group behindCharacterSprites.
In the ambient file, the SNOW, RAIN and SAKURA ambients use a helper function to create the emitters (it's very close to the top of the file, and it's called addEmiter). There, we create an emitter and put it to work. what you need to do is add it to the group, like this (second line):
var emitter = game.add.emitter(game.world.centerX, -32, options.maxParticles);The ambients RAIN and SAKURA will be shown behind the characters as well, but maybe it's ok for you.
RenJS.storyManager.behindCharactersSprites.add(emitter);
emitter.width = game.world.width * 1.5;