Created
August 9, 2015 19:56
-
-
Save koreus7/06bee4a30d22bdc76d62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// app.js | |
define(["require", "exports", "Player"], function (require, exports, player) { | |
var PhaserDemo = (function () { | |
function PhaserDemo() { | |
this.game = new Phaser.Game(800, 600, Phaser.WEBGL, 'content', { preload: this.preload, create: this.create }); | |
} | |
PhaserDemo.prototype.preload = function () { | |
this.game.load.image('phaser_run', 'run.png'); | |
}; | |
PhaserDemo.prototype.create = function () { | |
this.game.stage.backgroundColor = "#000000"; | |
var p = new player.Player(); | |
console.log(p); | |
p.pos.x = this.game.stage.width / 2 - p.radius / 2; | |
p.pos.y = this.game.stage.height / 2 - p.radius / 2; | |
}; | |
return PhaserDemo; | |
})(); | |
window.onload = function () { | |
console.log("ONLOAD"); | |
var game = new PhaserDemo(); | |
}; | |
}); | |
//# sourceMappingURL=app.js.map | |
// Player.js | |
define(["require", "exports"], function (require, exports) { | |
var Player = (function () { | |
function Player() { | |
this.pos = new Phaser.Point(0, 0); | |
this.radius = 100; | |
} | |
return Player; | |
})(); | |
exports.Player = Player; | |
}); | |
//# sourceMappingURL=Player.js.map |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment