Skip to content

Instantly share code, notes, and snippets.

Last active January 3, 2016 04:19
What would you like to do?
Preload description of BasicPlatformer
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