mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
Merge pull request #196 from pandamicro/v0.7
Fix undefined cc.initEngine issue and fix break issue for v3.3
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
// cc.initEngine
|
||||
cc.initEngine = function (config, cb) {
|
||||
require('script/jsb.js');
|
||||
cc._renderType = cc.game.RENDER_TYPE_OPENGL;
|
||||
cc._initDebugSetting(config[cc.game.CONFIG_KEY.debugMode]);
|
||||
cc._engineLoaded = true;
|
||||
cc.log(cc.ENGINE_VERSION);
|
||||
if (cb) cb();
|
||||
};
|
||||
|
||||
require('./jsb-predefine');
|
||||
require('./jsb-game');
|
||||
require('./jsb-director');
|
||||
@@ -27,6 +37,9 @@ var _engineNumberVersion = (function () {
|
||||
// Version polyfills
|
||||
if (_engineNumberVersion) {
|
||||
if (_engineNumberVersion.major === 3) {
|
||||
if (_engineNumberVersion.minor < 6) {
|
||||
require('./versions/jsb-polyfill-v3.5');
|
||||
}
|
||||
if (_engineNumberVersion.minor < 9) {
|
||||
require('./versions/jsb-polyfill-v3.8');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2015 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
'use strict';
|
||||
|
||||
if (!cc.Scheduler.prototype.unscheduleAllForTarget) {
|
||||
cc.Scheduler.prototype.unscheduleAllForTarget = function (target) {
|
||||
this.unscheduleAllCallbacksForTarget(target);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user