在layer中new一个类,报错

this._textObj =
new cc.Class.extend({

ctor:

function(){

this._sprite =
new cc.Sprite(cc.spriteFrameCache.getSpriteFrame(‘loading.png’));
},

update:
function(){

},

})(); // 报错

this._textObj =
new game.Hero();// 不报错Hero也是用cc.Class 继承的,不明白,求解释

把报错信息 发出来 就知道哪错了

this._super()在ctor中忘记写了。

继承cc.Class需要this._super()吗

知道哪错了,谢谢