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.

Message2Server.proto 1.4 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // Message2Server
  2. syntax = "proto3";
  3. package protobuf;
  4. import "MessageType.proto";
  5. message PlayerMsg
  6. {
  7. int64 player_id = 1;
  8. PlayerType player_type = 2;
  9. oneof job_type
  10. {
  11. HumanType human_type = 3;
  12. ButcherType butcher_type = 4;
  13. }
  14. }
  15. message MoveMsg
  16. {
  17. int64 player_id = 1;
  18. double angle = 2;
  19. int64 time_in_milliseconds = 3;
  20. }
  21. message PickMsg
  22. {
  23. int64 player_id = 1;
  24. PropType prop_type = 2;
  25. }
  26. message SendMsg
  27. {
  28. int64 player_id = 1;
  29. int64 to_player_id = 2;
  30. string message = 3;
  31. }
  32. message AttackMsg
  33. {
  34. int64 player_id = 1;
  35. double angle = 2;
  36. }
  37. message IDMsg
  38. {
  39. int64 playerID = 1;
  40. }
  41. // 基本继承于THUAI5,为了使发送的信息尽可能不被浪费,暂定不发这类大包。
  42. // message MessageToServer
  43. // {
  44. // MessageType messageType = 1;
  45. // int64 playerID = 2; // 消息发送者的playerID
  46. // PlayerType playerType = 3;
  47. // HumanType humanType= 4;
  48. // ButcherType butcherType = 5;
  49. // double angle = 6; // messageType为Move, Attack时的角度
  50. // PropType propType = 7; // messageType为PickProp时要捡起的道具类型,防止多个道具堆叠时出现问题
  51. // int64 timeInMilliseconds = 8;//时间参数
  52. // int64 ToPlayerID = 9; // messageType为Send时要发送的对象的ID
  53. // string message = 10; // messageType为Send时发送的消息内容
  54. // }