Preload description of BasicPlatformer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function preload() { | |
// Load the 'map.json' file using the TILDED_JSON special flag | |
game.load.tilemap('map', 'assets/map.json', null, Phaser.Tilemap.TILED_JSON); | |
// Load the image 'level.png' and associate it in the cache as 'level' | |
game.load.image('level', 'assets/level.png'); | |
// Load the spritesheet 'character.png', telling Phaser each frame is 30x48 | |
game.load.spritesheet('character', 'assets/character.png', 30, 48); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment