mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
Merge pull request #235 from pandamicro/v0.7
Fix issue of replace scene in event callback in JSB
This commit is contained in:
+4
-1
@@ -141,7 +141,10 @@ cc.js.mixin(cc.director, {
|
||||
this.runWithScene(sgScene);
|
||||
}
|
||||
else {
|
||||
this.replaceScene(sgScene);
|
||||
// Delay to avoid issues like transition in event callback
|
||||
this.once(cc.Director.EVENT_AFTER_DRAW, function () {
|
||||
this.replaceScene(sgScene);
|
||||
});
|
||||
}
|
||||
|
||||
// Activate
|
||||
|
||||
Reference in New Issue
Block a user