Using: fx_game.mp3
{ "resources": [ "./assets/audio/fx_game.ogg", "./assets/audio/fx_game.mp3" ], "spritemap": { "coin": { "start": 0, "end": 0.3, "loop": false }, "jump": { "start": 0.5, "end": 0.9, "loop": false }, "death": { "start": 1, "end": 2.8, "loop": false } } } |
Packing timestamp in audio sprite ( a demo will be shown in Adobe Audition )
Hint:
<scene>.physics.world.setFPS( that.physics.world.fps / 4 ); <scene>.tweens.timeScale *= 4; <scene>.physics.world.timeScale = 1.0; |
Example uses following code to fill up the background. Is it efficient ? How could you improve it ?
for( let i = 0; i < 4000; i += 800 ){ this.sky = this.add.image(400 + i, 300, 'sky').setScale(0.5); } |