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

42 lines
849 B

4 years ago
4 years ago
4 years ago
  1. syntax="proto3"; //Proto协议
  2. package pb; //当前包名
  3. option csharp_namespace="Pb"; //给C#提供的选项
  4. //同步客户端玩家ID
  5. message SyncPID{
  6. int32 PID=1;
  7. }
  8. //玩家位置
  9. message Position{
  10. float X=1;
  11. float Y=2;
  12. float Z=3;
  13. float V=4;
  14. }
  15. //玩家广播数据
  16. message BroadCast{
  17. int32 PID=1;
  18. int32 Tp=2; //1-世界聊天 2-玩家位置 3 动作 4 移动之后坐标信息更新
  19. oneof Data {
  20. string Content=3; //聊天的信息
  21. Position P=4; //广播用户的位置
  22. int32 ActionData=5;
  23. }
  24. }
  25. //玩家聊天数据
  26. message Talk{
  27. string Content=1; //聊天内容
  28. }
  29. //玩家信息
  30. message Player{
  31. int32 PID=1;
  32. Position P=2;
  33. }
  34. //同步玩家显示数据
  35. message SyncPlayers{
  36. repeated Player ps=1;
  37. }