美文网首页
Cocos Creater 隐藏与显示Node

Cocos Creater 隐藏与显示Node

作者: _WhatsUp_ | 来源:发表于2018-01-14 03:03 被阅读0次
//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

      本文链接:https://www.haomeiwen.com/subject/zlahoxtx.html