Merge pull request #284 from jareguo/master

move cc.log jsb polyfill to jsb/index.js
This commit is contained in:
Jare Guo
2016-01-25 16:49:11 +08:00
2 changed files with 10 additions and 14 deletions
-13
View File
@@ -28,19 +28,6 @@ require('./cocos2d/animation');
require('./cocos2d/particle/CCParticleAsset');
if (!(CC_EDITOR && Editor.isCoreLevel)) {
require('./cocos2d/particle/CCParticleSystem');
require('./extensions/spine');
if (cc.sys.isNative) {
// TODO - add to jsb ?
function log () {
var text = cc.formatStr.apply(this, arguments);
console.log(text);
}
cc.log = log;
cc.error = log;
cc.warn = log;
cc.info = log;
}
}
+10 -1
View File
@@ -48,4 +48,13 @@ if (_engineNumberVersion) {
require('./versions/jsb-polyfill-v3.9');
}
}
}
}
function log () {
var text = cc.formatStr.apply(this, arguments);
console.log(text);
}
cc.log = log;
cc.error = log;
cc.warn = log;
cc.info = log;