class TitleScene extends Phaser.Scene {
    constructor() {
        super("TitleScene");
    }

    preload() {
        this.load.image("titlescreen", "assets/Title.png");
    }

    create() {
        this.add.image(346/2, 240/2, "titlescreen");
        this.add.text(32, 220, "Press any key to start", {
            fontFamily: "sans-serif",
            color: "#111111"
        }).setStroke("#ffffff", 2);
        this.input.keyboard.on("keydown", function() {
            this.scene.start("GardenScene");
        }, this);
    }
}
