mirror of https://github.com/axmolengine/axmol.git
Merge pull request #5229 from dumganhar/iss3858-jsclass-log-fix
closed #3858: Pure JS class which is inherited from cc.Class will trigger an irrelevant log.
This commit is contained in:
commit
d2893c1e1e
|
@ -651,10 +651,13 @@ cc.Class.extend = function (prop) {
|
|||
function Class() {
|
||||
// All construction is actually done in the init method
|
||||
if (!initializing) {
|
||||
if (!this.ctor)
|
||||
cc.log("No ctor function found, please set `classes_need_extend` section at `ini` file as `tools/tojs/cocos2dx.ini`");
|
||||
else
|
||||
if (!this.ctor) {
|
||||
if (this.__nativeObj)
|
||||
cc.log("No ctor function found! Please check whether `classes_need_extend` section in `ini` file like which in `tools/tojs/cocos2dx.ini`");
|
||||
}
|
||||
else {
|
||||
this.ctor.apply(this, arguments);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 6ae9f506f5ac7288bd27d11594a8a8f4e6e8a7d1
|
||||
Subproject commit 8fd59c24bf5b46d2e02a8173ac19cdfc877263c5
|
|
@ -79,4 +79,4 @@ abstract_classes = ColliderDetector ColliderBody ArmatureDataManager ComAttribut
|
|||
# Determining whether to use script object(js object) to control the lifecycle of native(cpp) object or the other way around. Supported values are 'yes' or 'no'.
|
||||
script_control_cpp = no
|
||||
|
||||
classes_need_extend = Armature
|
||||
classes_need_extend = Armature ComController
|
||||
|
|
Loading…
Reference in New Issue