-
Notifications
You must be signed in to change notification settings - Fork 0
/
game.proto
78 lines (67 loc) · 1.36 KB
/
game.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
70
71
72
73
74
75
76
77
78
syntax = "proto3";
package game;
service game{
rpc SendPosition(PlayerPosition) returns (stream PlayerPosition) {}
rpc GetSprites(Empty) returns (stream Sprite) {}
rpc GetNpcs(Empty) returns (stream NPC) {}
rpc ShootNpc(NpcShot) returns (Empty) {}
rpc CheckNewGame(Empty) returns (NewGame) {}
rpc ToggleSprite(SpriteToggled) returns (Empty) {}
rpc GetMap(Empty) returns (Map) {}
rpc Revive(RevivedPlayer) returns (Empty) {}
}
message Empty{
}
message Map{
string map = 1;
}
message NewGame{
string game_uuid = 1;
}
message NpcShot{
string uuid = 1;
int32 damage = 2;
}
message RevivedPlayer{
string uuid = 1;
}
message PlayerPosition{
string uuid = 1;
float pos_x = 2;
float pos_y = 3;
float pos_angle = 4;
int32 health = 5;
double last_move = 6;
}
message Sprite{
string type = 1;
string uuid = 2;
float pos_x = 3;
float pos_y = 4;
string path = 5;
float scale = 6;
float shift = 7;
float animation_time = 8;
int32 state = 9;
bool hold = 10;
string last_press_uuid = 11;
}
message NPC{
string type = 1;
string uuid = 2;
float pos_x = 3;
float pos_y = 4;
string path = 5;
float scale = 6;
float shift = 7;
float animation_time = 8;
string ray_cast_uuid = 9;
string last_ray_cast_uuid = 10;
float ray_cast_dist = 11;
int32 health = 12;
}
message SpriteToggled{
string uuid = 1;
int32 state = 2;
string presser_uuid = 3;
}