(client) feat:定义部分消息文件

This commit is contained in:
m0_75251201
2025-07-15 19:08:10 +08:00
parent 55cf9d954e
commit 06489d5310
5 changed files with 2212 additions and 25 deletions

View File

@ -49,4 +49,57 @@ message SignupRequest {
message SignupResponse {
RequestResult result = 1;
string message = 2;
}
// 定义 FilePack 消息
message FilePack {
string filePath = 1;
bytes content = 2;
}
// 定义 DataPackListPack 消息
message DataPackListPack {
repeated Pair packIDAndVersion = 1;
// 定义内部的 Pair 消息(用于替代 Tuple<string, string>
message Pair {
string key = 1;
string value = 2;
}
}
// 定义 TileMapTablePack 消息
message TileMapTablePack {
map<int32, string> tileMapKey = 1; // 使用 int32 替代 int
}
// 定义 MapDataPack 消息
message MapDataPack {
Vector2 position = 1;
Vector2 size = 2;
repeated int32 tileMapType = 3; // 使用 int32 替代 int
}
// 定义 MonsterAttributes 消息
message MonsterAttributes {
int32 health = 1;
int32 moveSpeed = 2;
int32 attack = 3;
int32 defense = 4;
int32 attackSpeed = 5;
int32 attackRange = 6;
int32 attackTargetCount = 7;
}
// 定义 MonsterPack 消息
message MonsterPack {
int32 monsterID = 1;
Vector2 position = 2;
MonsterAttributes attributes = 3;
}
// 定义 Vector2 消息
message Vector2 {
float x = 1;
float y = 2;
}