// Learn cc.Class: // - https://docs.cocos.com/creator/manual/en/scripting/class.html // Learn Attribute: // - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html // Learn life-cycle callbacks: // - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html cc.Class({ extends: require("BaseItemConstroller"), properties: { label: cc.Label, }, // LIFE-CYCLE CALLBACKS: onLoad() { this._super(); // console.log("附加属性", this.item_Attached_type); // let item_Attached_type; // if (this.item_Attached_type == 0) { // item_Attached_type = "攻击"; // console.log("附加属性", item_Attached_type); // this.label.string = item_Attached_type + this.item_Attached_value; // } // if (this.item_Attached_type == 1) { // item_Attached_type = "连击率"; // console.log("附加属性", item_Attached_type); // this.label.string = item_Attached_type + this.item_Attached_value; // } // if (this.item_Attached_type == 2) { // item_Attached_type = "防御"; // console.log("附加属性", item_Attached_type); // this.label.string = item_Attached_type + this.item_Attached_value; // } // if (this.item_Attached_type == 3) { // item_Attached_type = "血量"; // console.log("附加属性", item_Attached_type); // this.label.string = item_Attached_type + this.item_Attached_value; // } // if (this.item_Attached_type == 4) { // item_Attached_type = "蓝量"; // console.log("附加属性", item_Attached_type); // this.label.string = item_Attached_type + this.item_Attached_value; // } // if (this.item_Attached_type == 5) { // item_Attached_type = "格挡回血量"; // console.log("附加属性", item_Attached_type); // this.label.string = item_Attached_type + this.item_Attached_value; // } // if (this.item_Attached_type == 6) { // item_Attached_type = "暴击率"; // console.log("附加属性", item_Attached_type); // this.label.string = item_Attached_type + this.item_Attached_value; // } // if (this.item_Attached_type == 7) { // item_Attached_type = "闪避回蓝量"; // console.log("附加属性", item_Attached_type); // this.label.string = item_Attached_type + this.item_Attached_value; // } // if (this.item_Attached_type == 8) { // item_Attached_type = "被动回蓝"; // console.log("附加属性", item_Attached_type); // this.label.string = item_Attached_type + this.item_Attached_value; // } // if (this.item_Attached_type == 9) { // item_Attached_type = "被动回血"; // console.log("附加属性", item_Attached_type); // this.label.string = item_Attached_type + this.item_Attached_value; // } }, start() { }, // update (dt) {}, });