ProAddLabel.js 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // Learn cc.Class:
  2. // - https://docs.cocos.com/creator/manual/en/scripting/class.html
  3. // Learn Attribute:
  4. // - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
  5. // Learn life-cycle callbacks:
  6. // - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
  7. cc.Class({
  8. extends: require("BaseItemConstroller"),
  9. properties: {
  10. label: cc.Label,
  11. },
  12. // LIFE-CYCLE CALLBACKS:
  13. onLoad() {
  14. this._super();
  15. // console.log("附加属性", this.item_Attached_type);
  16. // let item_Attached_type;
  17. // if (this.item_Attached_type == 0) {
  18. // item_Attached_type = "攻击";
  19. // console.log("附加属性", item_Attached_type);
  20. // this.label.string = item_Attached_type + this.item_Attached_value;
  21. // }
  22. // if (this.item_Attached_type == 1) {
  23. // item_Attached_type = "连击率";
  24. // console.log("附加属性", item_Attached_type);
  25. // this.label.string = item_Attached_type + this.item_Attached_value;
  26. // }
  27. // if (this.item_Attached_type == 2) {
  28. // item_Attached_type = "防御";
  29. // console.log("附加属性", item_Attached_type);
  30. // this.label.string = item_Attached_type + this.item_Attached_value;
  31. // }
  32. // if (this.item_Attached_type == 3) {
  33. // item_Attached_type = "血量";
  34. // console.log("附加属性", item_Attached_type);
  35. // this.label.string = item_Attached_type + this.item_Attached_value;
  36. // }
  37. // if (this.item_Attached_type == 4) {
  38. // item_Attached_type = "蓝量";
  39. // console.log("附加属性", item_Attached_type);
  40. // this.label.string = item_Attached_type + this.item_Attached_value;
  41. // }
  42. // if (this.item_Attached_type == 5) {
  43. // item_Attached_type = "格挡回血量";
  44. // console.log("附加属性", item_Attached_type);
  45. // this.label.string = item_Attached_type + this.item_Attached_value;
  46. // }
  47. // if (this.item_Attached_type == 6) {
  48. // item_Attached_type = "暴击率";
  49. // console.log("附加属性", item_Attached_type);
  50. // this.label.string = item_Attached_type + this.item_Attached_value;
  51. // }
  52. // if (this.item_Attached_type == 7) {
  53. // item_Attached_type = "闪避回蓝量";
  54. // console.log("附加属性", item_Attached_type);
  55. // this.label.string = item_Attached_type + this.item_Attached_value;
  56. // }
  57. // if (this.item_Attached_type == 8) {
  58. // item_Attached_type = "被动回蓝";
  59. // console.log("附加属性", item_Attached_type);
  60. // this.label.string = item_Attached_type + this.item_Attached_value;
  61. // }
  62. // if (this.item_Attached_type == 9) {
  63. // item_Attached_type = "被动回血";
  64. // console.log("附加属性", item_Attached_type);
  65. // this.label.string = item_Attached_type + this.item_Attached_value;
  66. // }
  67. },
  68. start() {
  69. },
  70. // update (dt) {},
  71. });