AI_worker_Attribute.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. var reGameStates = require('GameStates');
  2. //人物信息
  3. var character_Info = cc.Class({
  4. name: "characterInfo",
  5. properties: {
  6. //id
  7. id: -1,
  8. //起始位置,代码动态设置
  9. startTilePos: {
  10. default: new cc.Vec2(),
  11. visible: false,
  12. },
  13. //是否占用建筑
  14. isItOccupiedBuilding: {
  15. default: false,
  16. visible: false,
  17. },
  18. //占用建筑的名称
  19. //预制件节点的名字
  20. occupantBuildingName: {
  21. default: '',
  22. visible: false,
  23. },
  24. //占用建筑的id
  25. occupantBuildingID: {
  26. default: -1,
  27. type: cc.Integer,
  28. visible: false,
  29. },
  30. }
  31. });
  32. cc.Class({
  33. extends: cc.Component,
  34. properties: {
  35. //人物信息
  36. characterInfo: {
  37. type: character_Info,
  38. default: null
  39. },
  40. //最高体力值
  41. totalPhysicalStrength: {
  42. //参数列表
  43. default: 100, //默认值
  44. type: cc.Integer, //限制属性类型,例如cc.Node或cc.Integer以及Texture.WrapMode(文字型枚举类型?)
  45. visible: false, //属性框显隐
  46. // displayName: '体力值', //显示名字
  47. tooltip: '最高体力值', // 名字注释
  48. // range : [min,max,step] , //范围
  49. // slide : boolean , // 滑动条
  50. },
  51. //体力值
  52. physicalStrength: {
  53. //参数列表
  54. default: 100, //默认值
  55. type: cc.Integer, //限制属性类型,例如cc.Node或cc.Integer以及Texture.WrapMode(文字型枚举类型?)
  56. visible: true, //属性框显隐
  57. // displayName: '体力值', //显示名字
  58. tooltip: '体力值:决定在房子里休息多久,干活时间', // 名字注释
  59. // range : [min,max,step] , //范围
  60. // slide : boolean , // 滑动条
  61. },
  62. //忠诚度
  63. loyalty: {
  64. default: 100,
  65. type: cc.Integer,
  66. visible: true,
  67. // displayName: '忠诚度',
  68. tooltip: '忠诚度:如果工资不符合就会一直掉,低于50就会跑走',
  69. },
  70. //劳动力
  71. labour: {
  72. default: 5,
  73. type: cc.Integer,
  74. visible: true,
  75. tooltip: '劳动力:劳动力越高干活速度越快',
  76. },
  77. //人物速度
  78. characterSpeed: {
  79. default: 100,
  80. type: cc.Integer,
  81. visible: true,
  82. // displayName: '速度',
  83. tooltip: '速度:干活的速度,移动速度',
  84. },
  85. //身上是否有物品
  86. //可以是商品或者原材料
  87. isThereAItem: {
  88. default: false,
  89. visible: false,
  90. },
  91. transItems: {
  92. default: 0,
  93. type: cc.Integer,
  94. visible: true,
  95. // displayName: '搬运的货物',
  96. tooltip: '搬运货物的数量:当前身上的货物',
  97. },
  98. //是否有住房
  99. isThereAHouse: {
  100. default: false,
  101. visible: false,
  102. },
  103. //自己占用的房屋
  104. MyHouse: {
  105. default: null,
  106. visible: false,
  107. },
  108. // //人物建筑目标信息
  109. // targetBuildInfo: {
  110. // default: null,
  111. // visible: false,
  112. // },
  113. // //人物建筑目标节点
  114. // targetBuildInfoNode: {
  115. // default: null,
  116. // type: cc.Node,
  117. // visible: false,
  118. // },
  119. //建筑目标的buildingsInfo脚本
  120. targetBuildingsInfo: {
  121. default: null,
  122. type: cc.Node,
  123. visible: false,
  124. },
  125. //正在休息
  126. isResting: {
  127. default: false,
  128. visible: false,
  129. },
  130. //正在行走
  131. isWalking: {
  132. default: false,
  133. visible: false,
  134. },
  135. //正在工作
  136. isWorking: {
  137. default: false,
  138. visible: false,
  139. },
  140. //正在运输
  141. isTransport: {
  142. default: false,
  143. visible: false,
  144. },
  145. //是否寻找到工作
  146. isFindingAJob: {
  147. default: false,
  148. visible: false,
  149. },
  150. //是否可以解雇:默认可以解雇,只有找到工作才不解雇
  151. //空闲,返回家里,回家途中都可以解雇
  152. isCanDismissed: {
  153. default: true,
  154. visible: false,
  155. },
  156. },
  157. });