ItemStates.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. var ItemsType = cc.Enum({ //部位
  8. weapon_left: 0, //左手武器
  9. weapon_right: 1, //右手武器
  10. cloth: 2, //衣服
  11. pants: 3, //裤子
  12. belt: 4, //腰带
  13. helmet: 5, //帽子
  14. necklace: 6, //项链
  15. shoe: 7, //鞋子
  16. glove: 8, //手套 护腕
  17. kneecap: 9, //护膝
  18. });
  19. var GradeType = cc.Enum({ //品级
  20. White: 0,
  21. Green: 1,
  22. Blue: 2,
  23. Yellow: 3,
  24. Red: 4,
  25. });
  26. var ArguType = cc.Enum({
  27. maxhp: 0, //血量
  28. endurance: 1,
  29. maxendurance: 2, //蓝量
  30. damage: 3, //攻击力
  31. defens: 4, //防御
  32. combo_rat: 5, //连击率
  33. crit_rate: 6, //暴击率
  34. dodge_endurance: 7, //闪避回蓝
  35. defense_hp: 8, //格挡回血
  36. recover_h: 9, //被动回血1/s
  37. recover_enduranc: 10, //被动回蓝1/s
  38. block_minus_endurance: 11, //格挡减蓝量
  39. });
  40. cc.Class({
  41. extends: require("BaseItemConstroller"),
  42. properties: {
  43. items_type: { //部位
  44. default: 0,
  45. type: cc.Enum(ItemsType)
  46. },
  47. gradetype: { //品级
  48. default: 0,
  49. type: cc.Enum(GradeType)
  50. },
  51. argutype: { //属性
  52. default: 0,
  53. type: cc.Enum(ArguType)
  54. },
  55. },
  56. // LIFE-CYCLE CALLBACKS:
  57. // onLoad () {},
  58. start() {
  59. },
  60. // update (dt) {},
  61. });