mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 20:53:39 +00:00
14 lines
537 B
JavaScript
14 lines
537 B
JavaScript
/// <reference path="../../Phaser/Game.ts" />
|
|
(function () {
|
|
var game = new Phaser.Game(this, 'game', 800, 600, init, create);
|
|
function init() {
|
|
// Using Phasers asset loader we load up a PNG from the assets folder
|
|
game.loader.addImageFile('bunny', 'assets/sprites/bunny.png');
|
|
game.loader.load();
|
|
}
|
|
function create() {
|
|
// This will create a Sprite positioned at the top-left of the game (0,0)
|
|
// Try changing the 0, 0 values
|
|
game.add.sprite(0, 0, 'bunny');
|
|
}
|
|
})();
|