feat 协议移动到Public

This commit is contained in:
2025-12-15 11:22:59 +08:00
parent 6e19d93f5e
commit 3498cf158d
45 changed files with 2730 additions and 929 deletions

View File

@@ -0,0 +1,32 @@
syntax = "proto3";
option go_package = "common/proto/sc/sc_pb";
import "sc_common.proto";
// MESSAGE_ID_ENTER_INSTANCE
message C2S_EnterInstance {
int32 InstanceID = 1;
}
message S2C_EnterInstance {
PositionInfo Info = 1;
}
// MESSAGE_ID_ACTION
enum ActionID {
ACTION_ID_MOVE = 0; // 0-15都是移动指令
ACTION_ID_ATTACK = 16; // 攻击指令
}
message C2S_Action {
ActionID Action = 1; // 指令ID
bytes Payload = 2; // 指令数据
}
// MESSAGE_ID_POSITION
message PositionInfo {
int32 UID = 1;
double X = 2;
double Y = 3;
}
message S2C_Position {
repeated PositionInfo Info = 1;
}