2013-06-01 01:49:41 +00:00
|
|
|
/// <reference path="../../Phaser/Game.ts" />
|
|
|
|
|
|
|
|
(function () {
|
|
|
|
|
|
|
|
var game = new Phaser.Game(this, 'game', 800, 600, init, create, null, render);
|
|
|
|
|
|
|
|
function init() {
|
|
|
|
|
|
|
|
// Using Phasers asset loader we load up a PNG from the assets folder
|
2013-06-05 01:58:16 +00:00
|
|
|
game.load.image('sprite', 'assets/sprites/atari130xe.png');
|
|
|
|
game.load.start();
|
2013-06-01 01:49:41 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var sprite: Phaser.Sprite;
|
|
|
|
|
|
|
|
function create() {
|
|
|
|
|
|
|
|
sprite = game.add.sprite(200, 200, 'sprite');
|
|
|
|
|
|
|
|
// Enable Input detection
|
2013-06-02 13:19:12 +00:00
|
|
|
sprite.input.start(0, false, true);
|
2013-06-01 01:49:41 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function render() {
|
|
|
|
|
|
|
|
game.input.renderDebugInfo(32, 32);
|
|
|
|
sprite.input.renderDebugInfo(300, 32);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})();
|