Guest User

Untitled

a guest
Jul 22nd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. // Not exactly correct for the tileset since there are more possible floor tiles, but this will
  2. // do for the example.
  3. this.groundLayer.setCollisionByExclusion([-1, 6, 7, 8, 26]);
  4.  
  5. this.player = new Player(this, map.widthInPixels / 2, map.heightInPixels / 2);
  6.  
  7. // Watch the player and layer for collisions, for the duration of the scene:
  8. this.physics.add.collider(this.player.sprite, this.groundLayer);
Add Comment
Please, Sign In to add comment