phaser/wip/examples/state/Preloader.js
2013-09-13 17:48:47 +01:00

28 lines
620 B
JavaScript

var TestGame = {};
TestGame.Preloader = function (game) {
this.game = game;
};
TestGame.Preloader.prototype = {
preload: function () {
this.game.load.image('nocooper', '../assets/pics/1984-nocooper-space.png');
this.game.load.image('touhou', '../assets/pics/aya_touhou_teng_soldier.png');
this.game.load.image('cougar', '../assets/pics/cougar_ihsf.png');
this.game.load.spritesheet('button', '../assets/buttons/button_sprite_sheet.png', 193, 71);
},
create: function () {
console.log('Preloade finished, lets go to the main menu automatically');
this.game.state.start('mainmenu');
}
}