phaser/wip/TS Tests/sprites/create sprite 1.ts
2013-09-13 16:24:01 +01:00

23 lines
524 B
TypeScript

/// <reference path="../../Phaser/Game.ts" />
(function () {
var game = new Phaser.Game(this, 'game', 800, 600, preload, create);
function preload() {
// Using Phasers asset loader we load up a PNG from the assets folder
game.load.image('bunny', 'assets/sprites/bunny.png');
}
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');
}
})();