const game = new Phaser.Game({
    backgroundColor: '#efefef',
    height: 400,
    parent: 'game',
    
    // New Code
    state: {
        preload: preload,
        create: create,
        update: update,
    },
    type: Phaser.AUTO,
    width: 400,
});
// New Code
function preload() {}
// New Code
function create() {}
// New Code
function update() {}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/phaser-ce/2.11.1/phaser.min.js