class SceneShojiDoors extends Phaser.Scene 
{
    constructor ()
    {
        super({ key: "SceneShojiDoors", active: true });
    }
    
    preload ()
    {
        this.load.image("shojil", "assets/shoji.png?ver=" + VERSION);
        this.load.image("shojip", "assets/shojip.png?ver=" + VERSION);
	}

    create ()
    {
        this.leftDoor = this.add.image(0, 0, "shojil");
        this.rightDoor = this.add.image(0, 0, "shojil").setFlipX(true);
    }

    onOrientationChange ()
    {
        let status = this.scene.getStatus(this.scene.key);

        if (status < Phaser.Scenes.RUNNING)
        {
            return;
        }

        if (!this.orientationInit)
        {
            this.orientationInit = true;
        }
    }

    sleep ()
    {
        if (this.scene.isSleeping())
        {
            return;
        }

        this.scene.sleep();
    }

    wake ()
    {
        this.scene.wake();
        this.scene.bringToTop();

        if (!this.orientationInit)
        {
            this.onOrientationChange();
        }
    }

    update (time, delta) 
    {
    }
}