javascript - Phaser Tilemaps -
have tried code below , tileset doesn't load.
this.game.physics.startsystem(phaser.physics.arcade); map = game.add.tilemap('tilemap'); map.addtilesetimage('floor', 'tiles'); layer = map.createlayer('groundlayer'); layer.resizeworld();
found code worked
this.game.physics.startsystem(phaser.physics.arcade); this.map = game.add.tilemap('tilemap'); this.map.addtilesetimage('floor', 'floor'); this.layer = this.map.createlayer('groundlayer'); game.physics.enable(this.map, phaser.physics.arcade); this.map.setcollisionbetween(0, 1, true, "groundlayer"); this.layer.resizeworld();
Comments
Post a Comment