Updated world service to become a manager of game logic instances for each map.
This commit is contained in:
52
proto/game_logic.proto
Normal file
52
proto/game_logic.proto
Normal file
@@ -0,0 +1,52 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package game_logic;
|
||||
|
||||
service GameLogicService {
|
||||
rpc GetCharacter(CharacterRequest) returns (CharacterResponse);
|
||||
rpc MoveCharacter(CharacterMoveRequest) returns (CharacterMoveResponse);
|
||||
rpc GetTargetHp(ObjectHpRequest) returns (ObjectHpResponse);
|
||||
}
|
||||
|
||||
message CharacterRequest {
|
||||
string token = 1;
|
||||
string user_id = 2;
|
||||
string char_id = 3;
|
||||
string session_id = 4;
|
||||
}
|
||||
|
||||
message CharacterResponse {
|
||||
int32 count = 1;
|
||||
}
|
||||
|
||||
message CharacterMoveRequest {
|
||||
string session_id = 1;
|
||||
uint32 target_id = 2;
|
||||
float x = 3;
|
||||
float y = 4;
|
||||
float z = 5;
|
||||
}
|
||||
|
||||
message CharacterMoveResponse {
|
||||
int32 id = 1;
|
||||
int32 target_id = 2;
|
||||
int32 distance = 3;
|
||||
float x = 4;
|
||||
float y = 5;
|
||||
float z = 6;
|
||||
}
|
||||
|
||||
message AttackRequest {
|
||||
string session_id = 1;
|
||||
uint32 target_id = 2;
|
||||
}
|
||||
|
||||
message ObjectHpRequest {
|
||||
string session_id = 1;
|
||||
uint32 target_id = 2;
|
||||
}
|
||||
|
||||
message ObjectHpResponse {
|
||||
uint32 target_id = 1;
|
||||
int32 hp = 2;
|
||||
}
|
||||
Reference in New Issue
Block a user