AI_worker_Attribute.js 4.7 KB

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