Add a preloader bar

This commit is contained in:
2014-06-15 21:20:15 -07:00
parent 5c9f567b82
commit e9408fa8c8

View File

@@ -981,17 +981,13 @@ function rotatePoints(arr, x, y, degrees)
}, this); }, this);
} }
var GameState = function(game) {
}
function addAnimation(obj, anim) function addAnimation(obj, anim)
{ {
a = moonlightSettings['animations'][anim] a = moonlightSettings['animations'][anim]
obj.animations.add(anim, a['frames'], a['speed'], a['loop']) obj.animations.add(anim, a['frames'], a['speed'], a['loop'])
} }
GameState.prototype.preload = function() var GameState = function(game) {
{
} }
GameState.prototype.create = function() GameState.prototype.create = function()
@@ -1371,13 +1367,13 @@ function Boot()
var Boot = function(game) { var Boot = function(game) {
} }
Boot.preload = function() Boot.prototype.preload = function()
{ {
console.log("Boot.preload"); console.log("Boot.preload");
game.load.image('preloader', 'gfx/ui/preloader.png'); game.load.image('preloader', 'gfx/ui/preloader.png');
}; };
Boot.create = function() Boot.prototype.create = function()
{ {
console.log("Boot.create"); console.log("Boot.create");
this.input.maxPointers = 1; this.input.maxPointers = 1;