mirror of
https://github.com/photonstorm/phaser
synced 2024-12-18 09:03:29 +00:00
27 lines
509 B
TypeScript
27 lines
509 B
TypeScript
|
/// <reference path="../../Phaser/Game.ts" />
|
||
|
|
||
|
(function () {
|
||
|
|
||
|
var game = new Phaser.Game(this, 'game', 800, 600, init, create, update);
|
||
|
|
||
|
function init() {
|
||
|
|
||
|
// Using Phasers asset loader we load up a PNG from the assets folder
|
||
|
game.loader.addImageFile('atari', 'assets/sprites/atari800xl.png');
|
||
|
game.loader.load();
|
||
|
|
||
|
}
|
||
|
|
||
|
var atari: Phaser.Sprite;
|
||
|
|
||
|
function create() {
|
||
|
|
||
|
atari = game.add.sprite(200, 200, 'atari');
|
||
|
|
||
|
}
|
||
|
|
||
|
function update() {
|
||
|
}
|
||
|
|
||
|
})();
|