mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
16 lines
356 B
JavaScript
16 lines
356 B
JavaScript
|
|
var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create });
|
|
|
|
function preload() {
|
|
|
|
// Specify a unique key and a URL path
|
|
// The key must be unique between all images.
|
|
game.load.image('imageKey', 'assets/sprites/phaser2.png');
|
|
|
|
}
|
|
|
|
function create() {
|
|
|
|
game.add.sprite(0, 0, 'imageKey');
|
|
|
|
}
|