Scene Injection Map with UTF-8

Demonstrates how to use the Scene injection map to alias standard Scene systems, such as 'add' and 'load', to custom UTF-8 property names.

Scene Injection Map with UTF-8, running
800 × 600
GitHub
class Example extends Phaser.Scene
{
    constructor() {
        super({
            key: 'Example',
            map: {
                add: '加',
                load: '加载'
            }
        });
    }

    preload ()
    {
        this.load.setBaseURL('https://cdn.phaserfiles.com/v410');
        this.加载.image('face', 'assets/pics/bw-face.png');
    }

    create ()
    {
        this.加.image(400, 300, 'face');
        console.log(this);
    }
}

const config = {
    scale: { mode: Phaser.Scale.FIT },
    type: Phaser.AUTO,
    width: 800,
    height: 600,
    parent: 'game-container',
    scene: Example
};

const game = new Phaser.Game(config);

More in Scenes52 examples