Please rewrite the code above to use the latest version of Phaser.js.