-
Notifications
You must be signed in to change notification settings - Fork 21
/
Boot.js
43 lines (30 loc) · 969 Bytes
/
Boot.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
var BasicGame = {};
var clicks = 0;
var playmusic = true;
BasicGame.Boot = function (game) {
};
BasicGame.Boot.prototype = {
preload: function () {
this.load.image('preloaderBackground', 'assets/preloadbck.png');
this.load.image('preloaderBar', 'assets/preloadbar.png');
},
create: function () {
if (this.game.device.desktop)
{
this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;
this.scale.pageAlignHorizontally = true;
}
else
{
this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;
this.scale.minWidth = 150;
this.scale.minHeight = 250;
this.scale.maxWidth = 600;
this.scale.maxHeight = 1000;
this.scale.forceLandscape = false;
this.scale.pageAlignHorizontally = true;
}
this.scale.setScreenSize(true);
this.state.start('Preloader');
}
};