var QyLayer=window.QyLayer=cc.Layer.extend({ctor:function(i){this._super();i||(i={});i.hiddenAtStart&&this.hide();i.sticky&&(this.sticky=!0);i.id&&(window[i.id]=this)},setHidden:function(i){this.isHidden_=i;this.setVisible(!i);for(var e=this.children_||this.children,t=0;t<e.length;t++){var n=e[t];n.qyobj&&n.qyobj.setHidden(i)}},hide:function(){this.setHidden(!0)},show:function(){this.setHidden(!1)},toggleHidden:function(){this.setHidden(!this.isHidden_)},getNumberOfChildren:function(){return this.children.length},setChildIndex:function(i,e){if(void 0!==e){var t=this.getChildren(),n=t.indexOf(i);if(n!==e){n>-1&&t.splice(n,1);t.splice(e,0,i)}}}});