forked from 942764111/haididamaoxian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
executable file
·26 lines (20 loc) · 899 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
cc.game.onStart = function(){
if(!cc.sys.isNative && document.getElementById("cocosLoading")) //If referenced loading.js, please remove it
document.body.removeChild(document.getElementById("cocosLoading"));
// Pass true to enable retina display, disabled by default to improve performance
var sys = cc.sys;
cc.view.enableRetina(true);
//if(sys.os === sys.OS_IOS ||sys.os==sys.OS_ANDROID){
//
// // flax.init(cc.ResolutionPolicy.SHOW_ALL);
//}else{
// flax.init(cc.ResolutionPolicy.FIXED_HEIGHT);
//}
flax.init(cc.ResolutionPolicy.FIXED_HEIGHT);
// cc.view.resizeWithBrowserSize(true);
flax.registerScene("GameBegin", GameBeginScene, res_GameBegin);
flax.registerScene("GameMove", GameMoveScene,res_GameMove);
flax.registerScene("GameEnd", GameendScene,res_GameMove);
flax.replaceScene("GameBegin");
};
cc.game.run();