web client

This commit is contained in:
2025-07-04 23:42:27 +08:00
parent f0fd00d706
commit 027f582d4e
13 changed files with 19795 additions and 85 deletions

View File

@@ -0,0 +1,33 @@
syntax = "proto3";
option go_package = "common/proto/gen/cs";
import "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_INVALID = 0;
ACTION_ID_MOVE = 1; // 1-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;
}

View File

@@ -0,0 +1,6 @@
syntax = "proto3";
// 通用占位符文件避免import错误
message Placeholder {
int32 id = 1;
}

View File

@@ -0,0 +1,16 @@
syntax = "proto3";
option go_package = "common/proto/gen/cs";
import "common.proto";
enum MessageID {
MESSAGE_ID_INVALID = 0;
MESSAGE_ID_ENTER_INSTANCE = 1; // 进入副本
MESSAGE_ID_ACTION = 2; // 指令
MESSAGE_ID_POSITION = 3; // 位置更新
}
message Message {
MessageID ID = 1;
bytes Payload = 2;
}