2013-05-29 01:58:56 +00:00
|
|
|
/// <reference path="../../Phaser/Game.ts" />
|
|
|
|
|
|
|
|
(function () {
|
|
|
|
|
2013-08-08 03:35:13 +00:00
|
|
|
var game = new Phaser.Game(this, 'game', 800, 600, preload, create);
|
2013-05-29 01:58:56 +00:00
|
|
|
|
2013-08-08 03:35:13 +00:00
|
|
|
function preload() {
|
2013-05-29 01:58:56 +00:00
|
|
|
|
|
|
|
// Using Phasers asset loader we load up a PNG from the assets folder
|
2013-06-05 01:58:16 +00:00
|
|
|
game.load.image('bunny', 'assets/sprites/bunny.png');
|
2013-08-08 03:35:13 +00:00
|
|
|
|
2013-05-29 01:58:56 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function create() {
|
|
|
|
|
|
|
|
// This will create a Sprite positioned at the top-left of the game (0,0)
|
|
|
|
// Try changing the 0, 0 values
|
2013-06-26 04:44:56 +00:00
|
|
|
game.add.sprite(0, 0, 'bunny');
|
2013-06-06 01:47:08 +00:00
|
|
|
|
2013-05-29 01:58:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
})();
|