2017-09-24 22:23:22 +00:00
|
|
|
module TK.SpaceTac.UI {
|
2017-10-08 21:25:24 +00:00
|
|
|
/**
|
|
|
|
* 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() {
|
2017-10-09 22:59:49 +00:00
|
|
|
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");
|
2017-10-09 22:59:49 +00:00
|
|
|
}
|
2014-12-29 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
create() {
|
2017-01-22 17:00:59 +00:00
|
|
|
this.game.stage.backgroundColor = 0x000000;
|
2017-10-08 21:25:24 +00:00
|
|
|
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
|
|
|
|
2017-10-08 21:25:24 +00:00
|
|
|
this.game.state.start("router");
|
2014-12-29 00:00:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|