phaser-node-kit
Version:
Rapid Game Development with PhaserJS and Node for Modern Browsers
27 lines (18 loc) • 453 B
JavaScript
class PreloadState {
preload() {
this.preloadBar = this.game.add.sprite(
this.world.centerX,
this.world.centerY,
'preload')
this.preloadBar.anchor.set(.5)
this.load.setPreloadSprite(this.preloadBar)
this.load.image('logo', 'img/logo.png')
this.load.image('pnlogo', 'img/pnlogo.png')
}
create() {
this.state.start('MainMenu')
}
update() { }
render() { }
}
module.exports = PreloadState