TrucoGameProtocol.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. var BaseDefine = require("BaseDefine")
  2. var Global = require("Global")
  3. cc.Class({
  4. extends: cc.Component,
  5. properties: {
  6. },
  7. statics: {
  8. GAME_GENRE:BaseDefine.GAME_GENRE_SCORE|BaseDefine.GAME_GENRE_MATCH|BaseDefine.GAME_GENRE_GOLD,
  9. GAME_STATUS_FREE:BaseDefine.GAME_STATUS_FREE, //等待开始
  10. GAME_STATUS_PLAY:BaseDefine.GAME_STATUS_PLAY, //游戏状态
  11. GAME_PLAYER:4,
  12. HAND_CARD_COUNT:3, //牌数量
  13. SIDE_NUM:2, //队伍数量
  14. ROUND_MAX:3,
  15. MIN_TEAM_CARD_COUNT:3, //组合最少牌数
  16. MAX_TEAM_COUNT:6, //最大组合数
  17. MAX_CARD_INDEX: 54,
  18. MAX_CARD_COUNT: 104,
  19. //服务器命令结构
  20. SUB_S_GAME_FREE :100, //游戏空闲
  21. SUB_S_GAME_START :101, //游戏开始
  22. SUB_S_GAME_END :102, //游戏结束
  23. SUB_S_GAME_CONTINUE :103, //状态通知
  24. SUB_S_TRUCO :104,
  25. SUB_S_TRUCO_CHOOSE :105,
  26. SUB_S_ROUND_START :106,
  27. SUB_S_COMPARE_CARD :107,
  28. SUB_S_TRUCO_SET :108,
  29. SUB_S_FORCE_LEAVE_CHOOSE :109,
  30. SUB_S_OPERATE_FAIL :110, //操作失败
  31. SUB_S_GET_CARD :111, //玩家抓牌
  32. SUB_S_OUT_CARD :112, //玩家出牌
  33. SUB_S_TRUSTEE_STATUS :114, //托管信息
  34. SUB_S_CELL_SCORE :115,
  35. SUB_S_FINAL_ROUND :116,
  36. SUB_S_FINAL_CHOOSE :117,
  37. SUB_S_WAIT_START :120, //
  38. SUB_S_GAME_INFO :130,
  39. SUB_C_TEST_GETCARD :200, //
  40. SUB_C_TEST_SETCARD :201, //
  41. //操作失败
  42. OPERATE_OUTCARD :0, //出牌
  43. OPERATE_GETCARD :1, //抓牌
  44. OPERATE_FINISHSLOT :2, //胡牌
  45. //客户端命令结构
  46. SUB_C_TRUCO :1, //玩家truco
  47. SUB_C_OUT_CARD :2, //玩家出牌
  48. SUB_C_TRUCO_CHOOSE :3, //truco选择
  49. SUB_C_FORCE_LEAVE :4, //强退
  50. SUB_C_CANCEL_TRUSTEE :5, //取消托管
  51. SUB_C_FINAL_CHOOSE :6,
  52. SUB_C_TEST_CARD :100, //测试
  53. Tile_Color : cc.Enum({
  54. COLOR_JOKER:4,
  55. COLOR_HEI:3,
  56. COLOR_HONG:2,
  57. COLOR_MEI:1,
  58. COLOR_FANG:0,
  59. }),
  60. Tile_Num : cc.Enum({
  61. Num_A:1,
  62. Num_2:2,
  63. Num_3:3,
  64. Num_4:4,
  65. Num_5:5,
  66. Num_6:6,
  67. Num_7:7,
  68. Num_8:8,
  69. Num_9:9,
  70. Num_10:10,
  71. Num_J:11,
  72. Num_Q:12,
  73. Num_K:13,
  74. Num_S_JOKER:14,
  75. Num_B_JOKER:15,
  76. }),
  77. Tile_Weight: cc.Enum({
  78. Weight_2:2,
  79. Weight_3:3,
  80. Weight_4:4,
  81. Weight_5:5,
  82. Weight_6:6,
  83. Weight_7:7,
  84. Weight_8:8,
  85. Weight_9:9,
  86. Weight_10:10,
  87. Weight_J:11,
  88. Weight_Q:12,
  89. Weight_K:13,
  90. Weight_A:14,
  91. Weight_S_JOKER:16,
  92. Weight_B_JOKER:17,
  93. }),
  94. Group_Type : cc.Enum({
  95. Invalid:0,
  96. PureSequence:1,
  97. Sequence:2,
  98. Set:3,
  99. Joker:4,
  100. }),
  101. },
  102. });