-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprojectA.proto
71 lines (52 loc) · 1.04 KB
/
projectA.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package ProjectA;
message LoginReq{
required string id = 1;
required string pw = 2;
}
message LoginRes{
required bool bResult = 1;
required string key = 2;
}
message RespawnReq {
required float x = 1;
required float y = 2;
required int32 unitType = 3;
required string key =4;
}
message RespawnRes {
required bool bResult = 1;
}
message Position{
required float x = 1;
required float y = 2;
}
message GameUnit{
required int32 index = 1;
required float posX = 2;
required float posY = 3;
required float angle = 4;
}
message SyncReq {
required int32 Count = 1;
required string key = 2;
}
message SyncRes {
repeated GameUnit units = 2;
}
message OneMessage {
enum ProtocolType {
LOGINREQ = 1;
LOGINRES = 2;
RESPWANREQ = 3;
RESPWANRES = 4;
SYNCREQ = 5;
SYNCRES = 6;
}
required ProtocolType pType = 1;
optional LoginReq loginReq = 2;
optional LoginRes loginRes = 3;
optional RespawnReq respawnReq = 4;
optional RespawnRes respawnRes = 5;
optional SyncReq syncReq = 6;
optional SyncRes syncRes = 7;
}