-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
40 lines (32 loc) · 972 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
require("jsb.js");
var MW = MW || {};
var appFiles = [
'Resource.js',
'GameConfig.js',
'EnemyType.js',
'Level.js',
'Effect.js',
'Bullet.js',
'Enemy.js',
'Explosion.js',
'Ship.js',
'LevelManager.js',
'GameControlMenu.js',
'GameLayer.js',
'GameOver.js',
'AboutLayer.js',
'SettingsLayer.js',
'SysMenu.js'
];
cc.dumpConfig();
for( var i=0; i < appFiles.length; i++) {
require( appFiles[i] );
}
var director = cc.Director.getInstance();
director.setDisplayStats(true);
// set FPS. the default value is 1.0/60 if you don't call this
director.setAnimationInterval(1.0 / 60);
// create a scene. it's an autorelease object
var mainScene = SysMenu.scene();
// run
director.runWithScene(mainScene);