mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
@@ -361,7 +361,7 @@ cc.Director = Class.extend(/** @lends cc.Director# */{
|
||||
this._paused = true;
|
||||
},
|
||||
|
||||
/**
|
||||
/*
|
||||
* Pops out a scene from the queue.<br/>
|
||||
* This scene will replace the running one.<br/>
|
||||
* The running scene will be deleted. If there are no more scenes in the stack the execution is terminated.<br/>
|
||||
@@ -450,7 +450,7 @@ cc.Director = Class.extend(/** @lends cc.Director# */{
|
||||
this.startAnimation();
|
||||
},
|
||||
|
||||
/**
|
||||
/*
|
||||
* Suspends the execution of the running scene, pushing it on the stack of suspended scenes.<br/>
|
||||
* The new scene will be executed.<br/>
|
||||
* Try to avoid big stacks of pushed scenes to reduce memory allocation.<br/>
|
||||
@@ -668,6 +668,7 @@ cc.Director = Class.extend(/** @lends cc.Director# */{
|
||||
//cc.AssetLibrary.unloadAsset(uuid); // force reload
|
||||
cc.AssetLibrary.loadAsset(uuid, function (error, sceneAsset) {
|
||||
var self = cc.director;
|
||||
self._loadingScene = '';
|
||||
var scene;
|
||||
if (error) {
|
||||
error = 'Failed to load scene: ' + error;
|
||||
@@ -694,7 +695,6 @@ cc.Director = Class.extend(/** @lends cc.Director# */{
|
||||
scene = null;
|
||||
}
|
||||
}
|
||||
self._loadingScene = '';
|
||||
if (error && onLaunched) {
|
||||
onLaunched(error);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ var RendererInSG = cc.Class({
|
||||
if (CC_EDITOR) {
|
||||
var sgSize = this._sgNode.getContentSize();
|
||||
// sgSize is not a Vec2 in JSB
|
||||
if (sgSize.x !== 0 || sgSize.y !== 0) {
|
||||
if (sgSize.width !== 0 || sgSize.height !== 0) {
|
||||
cc.error('Renderer error: Size of the cc._RendererInSG._sgNode must be zero');
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -252,6 +252,7 @@ cc.js.mixin(cc.director, {
|
||||
//cc.AssetLibrary.unloadAsset(uuid); // force reload
|
||||
cc.AssetLibrary.loadAsset(uuid, function (error, sceneAsset) {
|
||||
var self = cc.director;
|
||||
self._loadingScene = '';
|
||||
var scene;
|
||||
if (error) {
|
||||
error = 'Failed to load scene: ' + error;
|
||||
@@ -272,7 +273,6 @@ cc.js.mixin(cc.director, {
|
||||
scene = null;
|
||||
}
|
||||
}
|
||||
self._loadingScene = '';
|
||||
if (error && onLaunched) {
|
||||
onLaunched(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user