1
0
Fork 0
spacetac/src/ui/Boot.ts

27 lines
839 B
TypeScript
Raw Normal View History

2017-09-24 22:23:22 +00:00
module TK.SpaceTac.UI {
/**
* First view to boot.
*
* It is responsible to prepare the screen, and the asset loading.
*/
2014-12-29 00:00:00 +00:00
export class Boot extends Phaser.State {
preload() {
if (!(<MainUI>this.game).headless) {
2018-03-08 19:16:05 +00:00
this.load.image("preload-background", "images/preload/bar-background.png");
this.load.image("preload-bar", "images/preload/bar-content.png");
}
2014-12-29 00:00:00 +00:00
}
create() {
2017-01-22 17:00:59 +00:00
this.game.stage.backgroundColor = 0x000000;
this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;
this.scale.fullScreenScaleMode = Phaser.ScaleManager.SHOW_ALL;
2017-05-15 20:16:59 +00:00
this.input.maxPointers = 1;
2017-01-22 17:00:59 +00:00
2018-04-12 22:38:46 +00:00
this.add.image(643, 435, "preload-background");
2017-01-22 17:00:59 +00:00
this.game.state.start("router");
2014-12-29 00:00:00 +00:00
}
}
}