You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Message2Clients.proto 4.8 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. // Message2Client
  2. syntax = "proto3";
  3. package protobuf;
  4. import "MessageType.proto";
  5. message MessageOfStudent
  6. {
  7. int32 x = 1;
  8. int32 y = 2;
  9. int32 speed = 3;
  10. int32 determination = 4; // 剩余的学习毅力,相当于血量
  11. int32 addiction = 5; // 沉迷程度,相当于淘汰进度
  12. repeated double time_until_skill_available = 6;
  13. // PlaceType place = 7;
  14. repeated PropType prop = 8;
  15. PlayerState player_state = 9;
  16. int64 guid = 10;
  17. BulletType bullet_type = 12;
  18. int32 learning_speed = 13; // 修理电机的速度
  19. int32 treat_speed = 14; // 治疗的速度
  20. int64 player_id = 15;
  21. int32 view_range = 16; // 视野距离
  22. int32 radius = 17; // 半径
  23. double danger_alert = 19; // 危险警报,在捣蛋鬼靠近时会有预警
  24. int32 score = 20;
  25. int32 treat_progress = 21; // 治疗进度
  26. int32 rescue_progress = 22; // 救援进度
  27. StudentType student_type = 23;
  28. double facing_direction = 24;
  29. repeated StudentBuffType buff = 25;
  30. }
  31. message MessageOfTricker
  32. {
  33. int32 x = 1;
  34. int32 y = 2;
  35. int32 speed = 3;
  36. repeated double time_until_skill_available = 5;
  37. // PlaceType place = 6;
  38. repeated PropType prop = 7;
  39. TrickerType tricker_type = 8;
  40. int64 guid = 9;
  41. int32 score = 10;
  42. int64 player_id = 11;
  43. int32 view_range = 12; // 视野距离
  44. int32 radius = 13; // 半径
  45. PlayerState player_state = 14;
  46. double trick_desire = 15;//bgm
  47. double class_volume = 16;//bgm
  48. double facing_direction = 17;
  49. BulletType bullet_type = 18;
  50. repeated TrickerBuffType buff = 19;
  51. }
  52. message MessageOfBullet
  53. {
  54. BulletType type = 1;
  55. int32 x = 2;
  56. int32 y = 3;
  57. double facing_direction = 4;
  58. int64 guid = 5;
  59. PlayerType team = 6;
  60. // PlaceType place = 7;
  61. double bomb_range = 8;
  62. int32 speed = 9;
  63. }
  64. message MessageOfBombedBullet //for Unity,直接继承自THUAI5
  65. {
  66. BulletType type = 1;
  67. int32 x = 2;
  68. int32 y = 3;
  69. double facing_direction = 4;
  70. int64 mapping_id = 5;
  71. double bomb_range = 6;
  72. }
  73. message MessageOfProp // 可拾取道具的信息
  74. {
  75. PropType type = 1;
  76. int32 x = 2;
  77. int32 y = 3;
  78. double facing_direction = 4;
  79. int64 guid = 5;
  80. // PlaceType place = 6;
  81. }
  82. message MessageOfPickedProp //for Unity,直接继承自THUAI5
  83. {
  84. PropType type = 1;
  85. int32 x = 2;
  86. int32 y = 3;
  87. double facing_direction = 4;
  88. int64 mapping_id = 5;
  89. }
  90. message MessageOfClassroom
  91. {
  92. int32 x = 1;
  93. int32 y = 2;
  94. int32 progress = 3;
  95. }
  96. message MessageOfGate
  97. {
  98. int32 x = 1;
  99. int32 y = 2;
  100. int32 progress = 3;
  101. }
  102. message MessageOfHiddenGate
  103. {
  104. int32 x = 1;
  105. int32 y = 2;
  106. bool opened = 3;
  107. }
  108. message MessageOfDoor
  109. {
  110. int32 x = 1;
  111. int32 y = 2;
  112. bool is_open = 3;
  113. int32 progress = 4;
  114. }
  115. message MessageOfChest
  116. {
  117. int32 x = 1;
  118. int32 y = 2;
  119. int32 progress = 3;
  120. }
  121. message MessageOfMap
  122. {
  123. message Row
  124. {
  125. repeated PlaceType col = 1;
  126. }
  127. repeated Row row = 2;
  128. }
  129. message MessageOfNews
  130. {
  131. oneof news // 一条新闻
  132. {
  133. string text_message = 1;
  134. bytes binary_message = 4;
  135. }
  136. int64 from_id = 2;
  137. int64 to_id = 3;
  138. }
  139. message MessageOfObj
  140. {
  141. oneof message_of_obj
  142. {
  143. MessageOfStudent student_message = 1;
  144. MessageOfTricker tricker_message = 2;
  145. MessageOfProp prop_message = 3;
  146. MessageOfBullet bullet_message = 4;
  147. MessageOfBombedBullet bombed_bullet_message = 5;
  148. MessageOfClassroom classroom_message = 6;
  149. MessageOfDoor door_message = 7;
  150. MessageOfGate gate_message = 8;
  151. MessageOfChest chest_message = 9;
  152. MessageOfHiddenGate hidden_gate_message = 10;
  153. MessageOfNews news_message = 11;
  154. MessageOfMap map_message = 12;
  155. }
  156. }
  157. message MessageOfAll
  158. {
  159. int32 game_time = 1;
  160. int32 subject_finished = 2; // 完成的科目数
  161. int32 student_graduated = 3; // 已经毕业的学生数
  162. int32 student_quited = 4; // 已经退学的学生数
  163. int32 student_score = 5;
  164. int32 tricker_score = 6;
  165. }
  166. message MessageToClient
  167. {
  168. repeated MessageOfObj obj_message = 1;
  169. GameState game_state = 2;
  170. MessageOfAll all_message = 3;
  171. }
  172. message MoveRes // 如果打算设计撞墙保留平行速度分量,且需要返回值则可用这个(大概没啥用)
  173. {
  174. int64 actual_speed = 1;
  175. double actual_angle = 2;
  176. bool act_success = 3;
  177. }
  178. message BoolRes // 用于只需要判断执行操作是否成功的行为,如捡起道具、使用道具
  179. {
  180. bool act_success = 1;
  181. }
  182. // message MsgRes // 用于获取队友发来的消息
  183. // {
  184. // bool have_message = 1; // 是否有待接收的消息
  185. // int64 from_player_id = 2;
  186. // string message_received = 3;
  187. // }