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 2.4 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // Message2Client
  2. syntax = "proto3";
  3. package protobuf;
  4. import "MessageType.proto";
  5. message MessageOfHuman
  6. {
  7. int32 x = 1;
  8. int32 y = 2;
  9. int32 speed = 3;
  10. int32 life = 4; // 本次未倒地前的血量,也即还可以受的伤害
  11. int32 hanged_time = 5; // 被挂上的次数
  12. double time_until_skill_available = 6;
  13. PlaceType place = 7;
  14. PropType prop = 8;
  15. HumanType human_type = 9;
  16. int64 guid = 10;
  17. bool on_chair = 11; // 是否被挂
  18. double chair_time = 12; // 被挂的时间
  19. bool on_ground = 13; // 是否倒地
  20. double ground_time = 14; // 倒地时间
  21. int64 player_id = 15;
  22. int32 view_range = 16; // 视野距离
  23. repeated HumanBuffType buff = 17;
  24. }
  25. message MessageOfButcher
  26. {
  27. int32 x = 1;
  28. int32 y = 2;
  29. int32 speed = 3;
  30. int32 damage = 4;
  31. double time_until_skill_available = 5;
  32. PlaceType place = 6;
  33. PropType prop = 7;
  34. ButcherType butcher_type = 8;
  35. int64 guid = 9;
  36. bool movable = 10; // 是否进入了攻击后摇
  37. int64 playerID = 11;
  38. int32 view_range = 12; // 视野距离
  39. repeated ButcherBuffType buff = 13;
  40. }
  41. message MessageOfProp // 可拾取道具的信息
  42. {
  43. PropType type = 1;
  44. int32 x = 2;
  45. int32 y = 3;
  46. double facing_direction = 4;
  47. int64 guid = 5;
  48. PlaceType place = 6;
  49. int32 size = 7;
  50. bool is_moving = 8;
  51. }
  52. message MessageOfPickedProp //for Unity,直接继承自THUAI5
  53. {
  54. PropType type = 1;
  55. int32 x = 2;
  56. int32 y = 3;
  57. double facing_direction = 4;
  58. int64 mapping_id = 5;
  59. }
  60. message MessageOfMap
  61. {
  62. message Row
  63. {
  64. repeated PlaceType col = 1;
  65. }
  66. repeated Row row = 2;
  67. }
  68. message MessageToClient
  69. {
  70. repeated MessageOfHuman human_message = 1;
  71. repeated MessageOfButcher butcher_message = 2; // 是否真正repeated待定
  72. repeated MessageOfProp prop_message = 3;
  73. MessageOfMap map_massage = 4;
  74. }
  75. message MoveRes // 如果打算设计撞墙保留平行速度分量,且需要返回值则可用这个(大概没啥用)
  76. {
  77. int64 actual_speed = 1;
  78. double actual_angle = 2;
  79. }
  80. message BoolRes // 用于只需要判断执行操作是否成功的行为,如捡起道具、使用道具
  81. {
  82. bool act_success = 1;
  83. }
  84. message MsgRes // 用于获取队友发来的消息
  85. {
  86. bool have_message = 1; // 是否有待接收的消息
  87. int64 from_player_id = 2;
  88. string message_received = 3;
  89. }