Skip to content

Instantly share code, notes, and snippets.

@videlais
Last active January 3, 2016 04:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save videlais/b49f87b7774ab024f884 to your computer and use it in GitHub Desktop.
Save videlais/b49f87b7774ab024f884 to your computer and use it in GitHub Desktop.
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