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.5 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. int32 radius = 17; // 半径
  24. repeated HumanBuffType buff = 18;
  25. }
  26. message MessageOfButcher
  27. {
  28. int32 x = 1;
  29. int32 y = 2;
  30. int32 speed = 3;
  31. int32 damage = 4;
  32. double time_until_skill_available = 5;
  33. PlaceType place = 6;
  34. PropType prop = 7;
  35. ButcherType butcher_type = 8;
  36. int64 guid = 9;
  37. bool movable = 10; // 是否进入了攻击后摇
  38. int64 playerID = 11;
  39. int32 view_range = 12; // 视野距离
  40. int32 radius = 13; // 半径
  41. repeated ButcherBuffType buff = 14;
  42. }
  43. message MessageOfProp // 可拾取道具的信息
  44. {
  45. PropType type = 1;
  46. int32 x = 2;
  47. int32 y = 3;
  48. double facing_direction = 4;
  49. int64 guid = 5;
  50. PlaceType place = 6;
  51. int32 size = 7;
  52. bool is_moving = 8;
  53. }
  54. message MessageOfPickedProp //for Unity,直接继承自THUAI5
  55. {
  56. PropType type = 1;
  57. int32 x = 2;
  58. int32 y = 3;
  59. double facing_direction = 4;
  60. int64 mapping_id = 5;
  61. }
  62. message MessageOfMap
  63. {
  64. message Row
  65. {
  66. repeated PlaceType col = 1;
  67. }
  68. repeated Row row = 2;
  69. }
  70. message MessageToClient
  71. {
  72. repeated MessageOfHuman human_message = 1;
  73. repeated MessageOfButcher butcher_message = 2; // 是否真正repeated待定
  74. repeated MessageOfProp prop_message = 3;
  75. MessageOfMap map_massage = 4;
  76. }
  77. message MoveRes // 如果打算设计撞墙保留平行速度分量,且需要返回值则可用这个(大概没啥用)
  78. {
  79. int64 actual_speed = 1;
  80. double actual_angle = 2;
  81. }
  82. message BoolRes // 用于只需要判断执行操作是否成功的行为,如捡起道具、使用道具
  83. {
  84. bool act_success = 1;
  85. }
  86. message MsgRes // 用于获取队友发来的消息
  87. {
  88. bool have_message = 1; // 是否有待接收的消息
  89. int64 from_player_id = 2;
  90. string message_received = 3;
  91. }