-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboot-html5.js
More file actions
executable file
·44 lines (40 loc) · 1.49 KB
/
boot-html5.js
File metadata and controls
executable file
·44 lines (40 loc) · 1.49 KB
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
(function () {
var d = document;
var c = {
COCOS2D_DEBUG:2, //0 to turn debug off, 1 for basic debug, and 2 for full debug
box2d:false,
chipmunk:true,
showFPS:true,
loadExtension:true,
frameRate:60,
tag:'gameCanvas', //the dom element to run cocos2d on
//engineDir:'../../../../cocos2d/',
SingleEngineFile:'cocos2d-html5.min.js',
appFiles:[
'MainScene.js',
"GamePlayScene.js",
'resources-html5.js',
'boot2-html5.js'
]
};
window.addEventListener('DOMContentLoaded', function () {
//first load engine file if specified
var s = d.createElement('script');
/*********Delete this section if you have packed all files into one*******/
if (c.SingleEngineFile && !c.engineDir) {
s.src = c.SingleEngineFile;
}
else if (c.engineDir && !c.SingleEngineFile) {
s.src = c.engineDir + 'platform/jsloader.js';
}
else {
alert('You must specify either the single engine file OR the engine directory in "cocos2d.js"');
}
/*********Delete this section if you have packed all files into one*******/
//s.src = 'Packed_Release_File.js'; //IMPORTANT: Un-comment this line if you have packed all files into one
d.body.appendChild(s);
document.ccConfig = c;
s.id = 'cocos2d-html5';
//else if single file specified, load singlefile
});
})();