-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathBoot.js
50 lines (38 loc) · 1.07 KB
/
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
44
45
46
47
48
49
50
var BasicGame = {
};
BasicGame.Boot = function (game) {
};
BasicGame.Boot.prototype = {
preload: function () {
this.load.image('preloaderBackground', 'assets/preloading.png');
this.load.image('preloaderBar', 'assets/loaderbar.png');
this.load.image('decoding','assets/decoding.png');
},
create: function () {
if (this.game.device.desktop)
{
// this.scale.pageAlignHorizontally = true;
this.scale.setScreenSize(true);
}
else
{
this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;
this.scale.minWidth = 250;
this.scale.minHeight = 225;
this.scale.maxWidth = 500;
this.scale.maxHeight = 450;
this.scale.forceLandscape = true;
// this.scale.pageAlignHorizontally = true;
this.scale.setScreenSize(true);
}
this.state.start('Preloader');
}
};
function changevolume(){
if(music.paused==false){
music.pause();
}
else{
music.resume();
}
}