text: export default class MainScene extends Phaser.Scene {
    preload() {
      this.load.tilemapTiledJSON("map", "../assets/tilemaps/level.json");
      this.load.image(
        "kenney-tileset-64px-extruded",
        "../assets/tilesets/kenney-tileset-64px-extruded.png"
      );
  
      // An atlas is a way to pack multiple images together into one texture. For more info see:
      //  https://labs.phaser.io/view.html?src=src/animation/texture%20atlas%20animation.js
      // If you don't use an atlas, you can do the same thing with a spritesheet, see:
      //  https://labs.phaser.io/view.html?src=src/animation/single%20sprite%20sheet.js
      this.load.atlas("emoji", "../assets/atlases/emoji.png", "../assets/atlases/emoji.json");
    }
  
    create() {
      const map = this.make.tilemap({ key: "map" });
      const tileset = map.addTilesetImage("kenney-tileset-64px-extruded");
      const groundLayer = map.createLayer("Ground", tileset, 0, 0);
      const lavaLayer = map.createLayer("Lava", tileset, 0, 0);
  
      // Set colliding tiles before converting the layer to Matter bodies
      groundLayer.setCollisionByProperty({ collides: true });
      lavaLayer.setCollisionByProperty({ collides: true });
  
      // Get the layers registered with Matter. Any colliding tiles will be given a Matter body. We
      // haven't mapped our collision shapes in Tiled so each colliding tile will get a default
      // rectangle body (similar to AP).
      this.matter.world.convertTilemapLayer(groundLayer);
      this.matter.world.convertTilemapLayer(lavaLayer);
  
      this.matter.world.setBounds(0, 0, map.widthInPixels, map.heightInPixels);
      this.cameras.main.setBounds(0, 0, map.widthInPixels, map.heightInPixels);
  
      // --- Code along here ---
      //
      //
  
      const text = "Click and drag the emoji.\nArrow keys to move the camera.";
      const help = this.add.text(16, 16, text, {
        fontSize: "18px",
        padding: { x: 10, y: 5 },
        backgroundColor: "#ffffff",
        fill: "#000000",
      });
      help.setScrollFactor(0).setDepth(1000);
  
      const cursors = this.input.keyboard.createCursorKeys();
      const controlConfig = {
        camera: this.cameras.main,
        left: cursors.left,
        right: cursors.right,
        up: cursors.up,
        down: cursors.down,
        speed: 0.5,
      };
      this.controls = new Phaser.Cameras.Controls.FixedKeyControl(controlConfig);
    }
  
    update(time, delta) {
      this.controls.update(delta);
    }
  }
  