Armature的奇怪现象

同样的一段代码,但是分别在layer和Scene下显示不同。
难道armature骨骼动画不能在layer下运行?

代码如下:

ccs.armatureDataManager.addArmatureFileInfo(res.ExportJson);
this.armature = new ccs.Armature("test");
this.armature.getAnimation().play("idle",-1,1);
this.addChild(this.armature);

Layer下图像有显示,但是不会动,只显示骨骼动画第一帧。。


var HelloWorldLayer = cc.Layer.extend({
armature:null,
ctor:function () {
    ccs.armatureDataManager.addArmatureFileInfo(res.ExportJson);
    this.armature = new ccs.Armature("test");
    this.armature.getAnimation().play("idle",-1,1);
    this.addChild(this.armature);
}
});

Scene下图像正常显示动画


var HelloWorldScene = cc.Scene.extend({
armature:null,
onEnter:function () {
    ccs.armatureDataManager.addArmatureFileInfo(res.ExportJson);
    this.armature = new ccs.Armature("test");
    this.armature.getAnimation().play("idle",-1,1);
    this.addChild(this.armature);
}
});

ctor方法里面加上this._super()就行了

谢谢回复,我也不知道怎么搞的,就可以了。。。。

标题请改成“已解决”