2013-07-13 00:43:08 +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, null, render);
|
|
|
|
function preload() {
|
2013-07-13 00:43:08 +00:00
|
|
|
game.world.setSize(800, 600, true);
|
2013-07-13 14:47:32 +00:00
|
|
|
game.load.image('background', 'assets/misc/water_texture.jpg');
|
2013-07-13 00:43:08 +00:00
|
|
|
}
|
|
|
|
function create() {
|
2013-07-13 14:47:32 +00:00
|
|
|
game.camera.texture.loadImage('background', false);
|
2013-07-13 00:43:08 +00:00
|
|
|
}
|
|
|
|
function render() {
|
2013-07-13 14:47:32 +00:00
|
|
|
Phaser.DebugUtils.context.fillStyle = 'rgb(255, 255, 255)';
|
2013-08-08 00:07:22 +00:00
|
|
|
Phaser.DebugUtils.context.fillText('Draw background image using camera.texture property.', 196, 320);
|
2013-07-13 00:43:08 +00:00
|
|
|
}
|
|
|
|
})();
|