// Learn cc.Class: // - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/class.html // - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/class.html // Learn Attribute: // - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html // - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/reference/attributes.html // Learn life-cycle callbacks: // - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html // - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/life-cycle-callbacks.html cc.Class({ extends: cc.Component, properties: { // foo: { // // ATTRIBUTES: // default: null, // The default value will be used only when the component attaching // // to a node for the first time // type: cc.SpriteFrame, // optional, default is typeof default // serializable: true, // optional, default is true // }, // bar: { // get () { // return this._bar; // }, // set (value) { // this._bar = value; // } // }, }, // LIFE-CYCLE CALLBACKS: // onLoad () {}, start() { //进度条 要做 人头像 和进度条联动 let progressBar = this.progressBar = UtilsPrefabs.getNode("progressBar", this.node); //打击次数 let powcountlayout = this.powcountlayout = UtilsPrefabs.getNode("powcountlayout", this.node); let bar = UtilsPrefabs.getNode("bar", progressBar); let icmask =this.icmask = UtilsPrefabs.getNode("icmask", bar); let icmaskic =this.icmaskic = UtilsPrefabs.getNode("icmaskic", icmask); let ic =this.ic = UtilsPrefabs.getNode("ic", icmaskic); //设置头像 utils.loadHttpSpriteFrame(UserInfo.Player.head, ic.getComponent(cc.Sprite)); }, //设置 打击次数 的变化 setPowcount : function (callback) { let count = 0; // console.log("里面是什么",this.powcountlayout.children); // for (var i = this.powcountlayout.children.length-1; i >=0; i--) { for (var i = 0; i