-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
40 lines (32 loc) · 1005 Bytes
/
main.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
// Global Variables
var isConnected = false;
var user;
var testHolder;
var password;
var game = new Phaser.Game(1250, 500, Phaser.CANVAS, 'game'),
Main = function() {},
gameOptions = {
playSound: false,
playMusic: false
},
musicPlayer;
Phaser.Device.whenReady(function() {
game.plugins.add(PhaserInput.Plugin);
game.plugins.add(PhaserNineSlice.Plugin);
});
Main.prototype = {
preload: function() {
game.load.image('loading', 'assets/images/menu_images/loading.png');
game.load.image('brand', 'assets/images/menu_images/logo.png');
game.load.image('bg', 'assets/images/menu_images/bg.png');
game.load.script('polyfill', 'lib/polyfill.js');
game.load.script('utils', 'lib/utils.js');
game.load.script('splash', 'states/Splash.js');
},
create: function() {
game.state.add('Splash', Splash);
game.state.start('Splash');
}
};
game.state.add('Main', Main);
game.state.start('Main');