2013-07-12 02:28:46 +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);
|
|
|
|
function preload() {
|
2013-07-12 02:28:46 +00:00
|
|
|
// Using Phasers asset loader we load up a PNG from the assets folder
|
|
|
|
game.load.image('bunny', 'assets/sprites/bunny.png');
|
|
|
|
}
|
|
|
|
function create() {
|
2013-07-13 11:38:59 +00:00
|
|
|
// Here we'll assign the new sprite to the local bunny variable
|
|
|
|
var bunny = game.add.sprite(0, 0, 'bunny');
|
|
|
|
// And this sets the alpha of the sprite to 0.5, which is 50% opaque
|
2013-07-12 02:28:46 +00:00
|
|
|
bunny.alpha = 0.5;
|
|
|
|
}
|
|
|
|
})();
|