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