Skip to content

Commit 765e890

Browse files
author
jianglong0156
committed
issue cocos2d#1108: add two method cleanScript and restart
1 parent 78ae041 commit 765e890

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

CCBoot.js

+18
Original file line numberDiff line numberDiff line change
@@ -1673,6 +1673,17 @@ cc._initSys = function (config, CONFIG_KEY) {
16731673
// N/A in cocos2d-html5
16741674
};
16751675

1676+
/**
1677+
* cleanScript the singal JS file
1678+
* @memberof cc.sys
1679+
* @name cleanScript
1680+
* @param {String} jsfile
1681+
* @function
1682+
*/
1683+
sys.cleanScript = function (jsfile) {
1684+
// N/A in cocos2d-html5
1685+
};
1686+
16761687
/**
16771688
* Dump system informations
16781689
* @memberof cc.sys
@@ -2034,6 +2045,13 @@ cc.game = /** @lends cc.game# */{
20342045
self._paused = false;
20352046
},
20362047

2048+
/**
2049+
* Run game.
2050+
*/
2051+
restart: function () {
2052+
window.location.href = window.location.href;
2053+
},
2054+
20372055
/**
20382056
* Run game.
20392057
*/

0 commit comments

Comments
 (0)