cocos动态参数按钮

字数 0阅读 33
  此时的 this.btn.clickEvents相当于是 cc.Component.EventHandler[] 事件数组;

    for (var key in this.btn.clickEvents) {
        this.btn.clickEvents[key].customEventData = ">>>>>>>"
    }

  for (var key in item.getComponent("ExButton").clickEvents) {
          item.getComponent("ExButton").clickEvents[key].customEventData = i+1
       }

推荐阅读更多精彩内容