Lots of documentation updates and new Loader examples.

This commit is contained in:
photonstorm
2013-11-27 16:33:49 +00:00
parent 4926fac578
commit a9a46bfbbf
27 changed files with 1047 additions and 203 deletions
+9 -3
View File
@@ -1,5 +1,5 @@
var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render });
var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, render: render });
function preload() {
@@ -14,6 +14,9 @@ function preload() {
game.load.audio('boden', ['assets/audio/bodenstaendig_2000_in_rock_4bit.mp3', 'assets/audio/bodenstaendig_2000_in_rock_4bit.ogg']);
// If you know you only need to load 1 type of audio file, you can pass a string instead of an array, like this:
// game.load.audio('boden', 'assets/audio/bodenstaendig_2000_in_rock_4bit.mp3');
}
var music;
@@ -22,8 +25,6 @@ function create() {
game.stage.backgroundColor = '#182d3b';
// game.input.touch.preventDefault = false;
music = game.sound.play('boden');
}
@@ -32,4 +33,9 @@ function render() {
game.debug.renderSoundInfo(music, 32, 32);
if (music.isDecoding)
{
game.debug.renderText("Decoding MP3 ...", 32, 200);
}
}