DataLand.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: proto/game.proto
  4. namespace Uraus\Kku\Common;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * 土地信息
  10. *
  11. * Generated from protobuf message <code>uraus.kku.Common.DataLand</code>
  12. */
  13. class DataLand extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. *土地ID
  17. *
  18. * Generated from protobuf field <code>int64 id = 1;</code>
  19. */
  20. protected $id = 0;
  21. /**
  22. * 土地索引(几号地块)
  23. *
  24. * Generated from protobuf field <code>int64 index = 2;</code>
  25. */
  26. protected $index = 0;
  27. /**
  28. *是否需要 除草
  29. *
  30. * Generated from protobuf field <code>bool need_weed = 3;</code>
  31. */
  32. protected $need_weed = false;
  33. /**
  34. *是否需要 除虫
  35. *
  36. * Generated from protobuf field <code>bool need_pest_control = 4;</code>
  37. */
  38. protected $need_pest_control = false;
  39. /**
  40. *是否需要 浇水
  41. *
  42. * Generated from protobuf field <code>bool need_watering = 5;</code>
  43. */
  44. protected $need_watering = false;
  45. /**
  46. *土地的等级
  47. *
  48. * Generated from protobuf field <code>int64 level = 6;</code>
  49. */
  50. protected $level = 0;
  51. /**
  52. * 土地阶段
  53. *
  54. * Generated from protobuf field <code>.uraus.kku.Common.LAND_STATUS status = 7;</code>
  55. */
  56. protected $status = 0;
  57. /**
  58. * 是否可以施肥
  59. *
  60. * Generated from protobuf field <code>bool can_fertilization = 8;</code>
  61. */
  62. protected $can_fertilization = false;
  63. /**
  64. * 降级时间,时间戳
  65. *
  66. * Generated from protobuf field <code>int64 downgrade_time = 9;</code>
  67. */
  68. protected $downgrade_time = 0;
  69. /**
  70. * 种子 start
  71. * 种子种下的时间
  72. *
  73. * Generated from protobuf field <code>int64 seed_planting_times = 30;</code>
  74. */
  75. protected $seed_planting_times = 0;
  76. /**
  77. * 种子ID
  78. *
  79. * Generated from protobuf field <code>int64 seed_id = 31;</code>
  80. */
  81. protected $seed_id = 0;
  82. /**
  83. * 果实ID
  84. *
  85. * Generated from protobuf field <code>int64 fruit_id = 32;</code>
  86. */
  87. protected $fruit_id = 0;
  88. /**
  89. * 植株ID
  90. *
  91. * Generated from protobuf field <code>int64 plant_id = 33;</code>
  92. */
  93. protected $plant_id = 0;
  94. /**
  95. * 种子状态
  96. *
  97. * Generated from protobuf field <code>.uraus.kku.Common.SEED_STATUS seed_status = 34;</code>
  98. */
  99. protected $seed_status = 0;
  100. /**
  101. * 下一阶段时间
  102. *
  103. * Generated from protobuf field <code>int64 seed_next_times = 35;</code>
  104. */
  105. protected $seed_next_times = 0;
  106. /**
  107. * Constructor.
  108. *
  109. * @param array $data {
  110. * Optional. Data for populating the Message object.
  111. *
  112. * @type int|string $id
  113. * 土地ID
  114. * @type int|string $index
  115. * 土地索引(几号地块)
  116. * @type bool $need_weed
  117. * 是否需要 除草
  118. * @type bool $need_pest_control
  119. * 是否需要 除虫
  120. * @type bool $need_watering
  121. * 是否需要 浇水
  122. * @type int|string $level
  123. * 土地的等级
  124. * @type int $status
  125. * 土地阶段
  126. * @type bool $can_fertilization
  127. * 是否可以施肥
  128. * @type int|string $downgrade_time
  129. * 降级时间,时间戳
  130. * @type int|string $seed_planting_times
  131. * 种子 start
  132. * 种子种下的时间
  133. * @type int|string $seed_id
  134. * 种子ID
  135. * @type int|string $fruit_id
  136. * 果实ID
  137. * @type int|string $plant_id
  138. * 植株ID
  139. * @type int $seed_status
  140. * 种子状态
  141. * @type int|string $seed_next_times
  142. * 下一阶段时间
  143. * }
  144. */
  145. public function __construct($data = NULL) {
  146. \GPBMetadata\Proto\Game::initOnce();
  147. parent::__construct($data);
  148. }
  149. /**
  150. *土地ID
  151. *
  152. * Generated from protobuf field <code>int64 id = 1;</code>
  153. * @return int|string
  154. */
  155. public function getId()
  156. {
  157. return $this->id;
  158. }
  159. /**
  160. *土地ID
  161. *
  162. * Generated from protobuf field <code>int64 id = 1;</code>
  163. * @param int|string $var
  164. * @return $this
  165. */
  166. public function setId($var)
  167. {
  168. GPBUtil::checkInt64($var);
  169. $this->id = $var;
  170. return $this;
  171. }
  172. /**
  173. * 土地索引(几号地块)
  174. *
  175. * Generated from protobuf field <code>int64 index = 2;</code>
  176. * @return int|string
  177. */
  178. public function getIndex()
  179. {
  180. return $this->index;
  181. }
  182. /**
  183. * 土地索引(几号地块)
  184. *
  185. * Generated from protobuf field <code>int64 index = 2;</code>
  186. * @param int|string $var
  187. * @return $this
  188. */
  189. public function setIndex($var)
  190. {
  191. GPBUtil::checkInt64($var);
  192. $this->index = $var;
  193. return $this;
  194. }
  195. /**
  196. *是否需要 除草
  197. *
  198. * Generated from protobuf field <code>bool need_weed = 3;</code>
  199. * @return bool
  200. */
  201. public function getNeedWeed()
  202. {
  203. return $this->need_weed;
  204. }
  205. /**
  206. *是否需要 除草
  207. *
  208. * Generated from protobuf field <code>bool need_weed = 3;</code>
  209. * @param bool $var
  210. * @return $this
  211. */
  212. public function setNeedWeed($var)
  213. {
  214. GPBUtil::checkBool($var);
  215. $this->need_weed = $var;
  216. return $this;
  217. }
  218. /**
  219. *是否需要 除虫
  220. *
  221. * Generated from protobuf field <code>bool need_pest_control = 4;</code>
  222. * @return bool
  223. */
  224. public function getNeedPestControl()
  225. {
  226. return $this->need_pest_control;
  227. }
  228. /**
  229. *是否需要 除虫
  230. *
  231. * Generated from protobuf field <code>bool need_pest_control = 4;</code>
  232. * @param bool $var
  233. * @return $this
  234. */
  235. public function setNeedPestControl($var)
  236. {
  237. GPBUtil::checkBool($var);
  238. $this->need_pest_control = $var;
  239. return $this;
  240. }
  241. /**
  242. *是否需要 浇水
  243. *
  244. * Generated from protobuf field <code>bool need_watering = 5;</code>
  245. * @return bool
  246. */
  247. public function getNeedWatering()
  248. {
  249. return $this->need_watering;
  250. }
  251. /**
  252. *是否需要 浇水
  253. *
  254. * Generated from protobuf field <code>bool need_watering = 5;</code>
  255. * @param bool $var
  256. * @return $this
  257. */
  258. public function setNeedWatering($var)
  259. {
  260. GPBUtil::checkBool($var);
  261. $this->need_watering = $var;
  262. return $this;
  263. }
  264. /**
  265. *土地的等级
  266. *
  267. * Generated from protobuf field <code>int64 level = 6;</code>
  268. * @return int|string
  269. */
  270. public function getLevel()
  271. {
  272. return $this->level;
  273. }
  274. /**
  275. *土地的等级
  276. *
  277. * Generated from protobuf field <code>int64 level = 6;</code>
  278. * @param int|string $var
  279. * @return $this
  280. */
  281. public function setLevel($var)
  282. {
  283. GPBUtil::checkInt64($var);
  284. $this->level = $var;
  285. return $this;
  286. }
  287. /**
  288. * 土地阶段
  289. *
  290. * Generated from protobuf field <code>.uraus.kku.Common.LAND_STATUS status = 7;</code>
  291. * @return int
  292. */
  293. public function getStatus()
  294. {
  295. return $this->status;
  296. }
  297. /**
  298. * 土地阶段
  299. *
  300. * Generated from protobuf field <code>.uraus.kku.Common.LAND_STATUS status = 7;</code>
  301. * @param int $var
  302. * @return $this
  303. */
  304. public function setStatus($var)
  305. {
  306. GPBUtil::checkEnum($var, \Uraus\Kku\Common\LAND_STATUS::class);
  307. $this->status = $var;
  308. return $this;
  309. }
  310. /**
  311. * 是否可以施肥
  312. *
  313. * Generated from protobuf field <code>bool can_fertilization = 8;</code>
  314. * @return bool
  315. */
  316. public function getCanFertilization()
  317. {
  318. return $this->can_fertilization;
  319. }
  320. /**
  321. * 是否可以施肥
  322. *
  323. * Generated from protobuf field <code>bool can_fertilization = 8;</code>
  324. * @param bool $var
  325. * @return $this
  326. */
  327. public function setCanFertilization($var)
  328. {
  329. GPBUtil::checkBool($var);
  330. $this->can_fertilization = $var;
  331. return $this;
  332. }
  333. /**
  334. * 降级时间,时间戳
  335. *
  336. * Generated from protobuf field <code>int64 downgrade_time = 9;</code>
  337. * @return int|string
  338. */
  339. public function getDowngradeTime()
  340. {
  341. return $this->downgrade_time;
  342. }
  343. /**
  344. * 降级时间,时间戳
  345. *
  346. * Generated from protobuf field <code>int64 downgrade_time = 9;</code>
  347. * @param int|string $var
  348. * @return $this
  349. */
  350. public function setDowngradeTime($var)
  351. {
  352. GPBUtil::checkInt64($var);
  353. $this->downgrade_time = $var;
  354. return $this;
  355. }
  356. /**
  357. * 种子 start
  358. * 种子种下的时间
  359. *
  360. * Generated from protobuf field <code>int64 seed_planting_times = 30;</code>
  361. * @return int|string
  362. */
  363. public function getSeedPlantingTimes()
  364. {
  365. return $this->seed_planting_times;
  366. }
  367. /**
  368. * 种子 start
  369. * 种子种下的时间
  370. *
  371. * Generated from protobuf field <code>int64 seed_planting_times = 30;</code>
  372. * @param int|string $var
  373. * @return $this
  374. */
  375. public function setSeedPlantingTimes($var)
  376. {
  377. GPBUtil::checkInt64($var);
  378. $this->seed_planting_times = $var;
  379. return $this;
  380. }
  381. /**
  382. * 种子ID
  383. *
  384. * Generated from protobuf field <code>int64 seed_id = 31;</code>
  385. * @return int|string
  386. */
  387. public function getSeedId()
  388. {
  389. return $this->seed_id;
  390. }
  391. /**
  392. * 种子ID
  393. *
  394. * Generated from protobuf field <code>int64 seed_id = 31;</code>
  395. * @param int|string $var
  396. * @return $this
  397. */
  398. public function setSeedId($var)
  399. {
  400. GPBUtil::checkInt64($var);
  401. $this->seed_id = $var;
  402. return $this;
  403. }
  404. /**
  405. * 果实ID
  406. *
  407. * Generated from protobuf field <code>int64 fruit_id = 32;</code>
  408. * @return int|string
  409. */
  410. public function getFruitId()
  411. {
  412. return $this->fruit_id;
  413. }
  414. /**
  415. * 果实ID
  416. *
  417. * Generated from protobuf field <code>int64 fruit_id = 32;</code>
  418. * @param int|string $var
  419. * @return $this
  420. */
  421. public function setFruitId($var)
  422. {
  423. GPBUtil::checkInt64($var);
  424. $this->fruit_id = $var;
  425. return $this;
  426. }
  427. /**
  428. * 植株ID
  429. *
  430. * Generated from protobuf field <code>int64 plant_id = 33;</code>
  431. * @return int|string
  432. */
  433. public function getPlantId()
  434. {
  435. return $this->plant_id;
  436. }
  437. /**
  438. * 植株ID
  439. *
  440. * Generated from protobuf field <code>int64 plant_id = 33;</code>
  441. * @param int|string $var
  442. * @return $this
  443. */
  444. public function setPlantId($var)
  445. {
  446. GPBUtil::checkInt64($var);
  447. $this->plant_id = $var;
  448. return $this;
  449. }
  450. /**
  451. * 种子状态
  452. *
  453. * Generated from protobuf field <code>.uraus.kku.Common.SEED_STATUS seed_status = 34;</code>
  454. * @return int
  455. */
  456. public function getSeedStatus()
  457. {
  458. return $this->seed_status;
  459. }
  460. /**
  461. * 种子状态
  462. *
  463. * Generated from protobuf field <code>.uraus.kku.Common.SEED_STATUS seed_status = 34;</code>
  464. * @param int $var
  465. * @return $this
  466. */
  467. public function setSeedStatus($var)
  468. {
  469. GPBUtil::checkEnum($var, \Uraus\Kku\Common\SEED_STATUS::class);
  470. $this->seed_status = $var;
  471. return $this;
  472. }
  473. /**
  474. * 下一阶段时间
  475. *
  476. * Generated from protobuf field <code>int64 seed_next_times = 35;</code>
  477. * @return int|string
  478. */
  479. public function getSeedNextTimes()
  480. {
  481. return $this->seed_next_times;
  482. }
  483. /**
  484. * 下一阶段时间
  485. *
  486. * Generated from protobuf field <code>int64 seed_next_times = 35;</code>
  487. * @param int|string $var
  488. * @return $this
  489. */
  490. public function setSeedNextTimes($var)
  491. {
  492. GPBUtil::checkInt64($var);
  493. $this->seed_next_times = $var;
  494. return $this;
  495. }
  496. }
  497. // Adding a class alias for backwards compatibility with the previous class name.
  498. class_alias(DataLand::class, \Uraus\Kku\Common_DataLand::class);