Cocos Creater 隐藏与显示Node

//properties中定义
    resultDisplay: {
          default: null,
          type: cc.Sprite
      },



//隐藏
this.resultDisplay.node.active = false;

//显示
this.resultDisplay.node.active = true;

//设置显示层级
this.resultDisplay.node.setLocalZOrder(999);

你可能感兴趣的:(Cocos Creater 隐藏与显示Node)