File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -1645,7 +1645,7 @@ cc._initSys = function (config, CONFIG_KEY) {
1645
1645
capabilities [ "accelerometer" ] = true ;
1646
1646
1647
1647
/**
1648
- * Forces the garbage collection
1648
+ * Forces the garbage collection, only available in JSB
1649
1649
* @memberof cc.sys
1650
1650
* @name garbageCollect
1651
1651
* @function
@@ -1655,7 +1655,7 @@ cc._initSys = function (config, CONFIG_KEY) {
1655
1655
} ;
1656
1656
1657
1657
/**
1658
- * Dumps rooted objects
1658
+ * Dumps rooted objects, only available in JSB
1659
1659
* @memberof cc.sys
1660
1660
* @name dumpRoot
1661
1661
* @function
@@ -1665,7 +1665,7 @@ cc._initSys = function (config, CONFIG_KEY) {
1665
1665
} ;
1666
1666
1667
1667
/**
1668
- * Restart the JS VM
1668
+ * Restart the JS VM, only available in JSB
1669
1669
* @memberof cc.sys
1670
1670
* @name restartVM
1671
1671
* @function
@@ -1675,7 +1675,7 @@ cc._initSys = function (config, CONFIG_KEY) {
1675
1675
} ;
1676
1676
1677
1677
/**
1678
- * cleanScript the singal JS file
1678
+ * Clean a script in the JS VM, only available in JSB
1679
1679
* @memberof cc.sys
1680
1680
* @name cleanScript
1681
1681
* @param {String } jsfile
@@ -2047,10 +2047,14 @@ cc.game = /** @lends cc.game# */{
2047
2047
} ,
2048
2048
2049
2049
/**
2050
- * Run game.
2050
+ * Restart game.
2051
2051
*/
2052
2052
restart : function ( ) {
2053
- //window.location.href = window.location.href;
2053
+ cc . director . popToSceneStackLevel ( 0 ) ;
2054
+ // Clean up audio
2055
+ cc . audioEngine . end ( ) ;
2056
+
2057
+ cc . game . onStart ( ) ;
2054
2058
} ,
2055
2059
2056
2060
/**
You can’t perform that action at this time.
0 commit comments