Phaser Specific Tile "Collision"
<p><a href="https://i.stack.imgur.com/RE36K.png" rel="nofollow noreferrer">Simple Maze, created with Tiled</a></p>

<p>So, the initial plan was to create a maze via Tilemaps if the player(starting top left) touches the thing on the bottom right, the next level should be loaded.
What i've done so far is creating the collision between the walls(black) and now i dont really know how to begin with the "collision" of the thing in the bottom right.</p>

<p>This is my code so far </p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var labGame = labGame || {};

labGame.Game = function() {};

var map;
var layer;

var player;
var controls = {};
var playerSpeed = 350;
var jumpTimer = 0;

labGame.Game.prototype = {
  create: function() {
    map = this.add.tilemap("map", 64, 64);
    map.addTilesetImage("tileset");
    layer = map.createLayer(0);
    layer.resizeWorld();

    map.setCollisionBetween(2, 2);

    player = this.add.sprite(64, 384, "player");
    player.anchor.setTo(0,5, 0,5);
    this.physics.arcade.enable(player);
    this.camera.follow(player);
    player.body.collideWorldBounds = true;

    controls = {
      right: this.input.keyboard.addKey(Phaser.Keyboard.D),
      left: this.input.keyboard.addKey(Phaser.Keyboard.A),
      up: this.input.keyboard.addKey(Phaser.Keyboard.W),
      down: this.input.keyboard.addKey(Phaser.Keyboard.S),
    }
  },

  update: function() {
    player.body.velocity.x = 0;
    player.body.velocity.y = 0;
    this.physics.arcade.collide(player, layer);
    if(controls.right.isDown) {
      player.body.velocity.x += playerSpeed;
    }
    if(controls.left.isDown) {
      player.body.velocity.x -= playerSpeed;
    }
    if(controls.up.isDown) {
      player.body.velocity.y -= playerSpeed;
    }
    if(controls.down.isDown) {
      player.body.velocity.y += playerSpeed;
    }
  }
};</code></pre>
</div>
</div>
</p>

<p>(Someone in the phaser forum wrote that the Boot.js etc. things are later easier to "handle" or so, so i've started working with that)</p>