| @@ -0,0 +1 @@ | |||
| ./dependency/proto/go_output.sh: line 5: cd: too many arguments | |||
| @@ -0,0 +1,15 @@ | |||
| package main | |||
| import ( | |||
| thuai6 "API/thuai6" | |||
| ) | |||
| const Asynchronous = false | |||
| func GetStudentType() []thuai6.StudentType { | |||
| return []thuai6.StudentType{thuai6.Athlete, thuai6.Teacher, thuai6.StraightAStudent, thuai6.Sunshine} | |||
| } | |||
| func GetTrickerType() thuai6.TrickerType { | |||
| return thuai6.Assassin | |||
| } | |||
| @@ -0,0 +1,80 @@ | |||
| package core | |||
| import ( | |||
| thuai6 "API/thuai6" | |||
| ) | |||
| type ILogic interface { | |||
| Move(time int64, angle float64) bool | |||
| TryConnection() bool | |||
| GetStudentSelfInfo() *thuai6.Student | |||
| GetTrickerSelfInfo() *thuai6.Tricker | |||
| } | |||
| type StudentAPI struct { | |||
| logic ILogic | |||
| } | |||
| type TrickerAPI struct { | |||
| logic ILogic | |||
| } | |||
| func NewStudentAPI(logic ILogic) *StudentAPI { | |||
| return &StudentAPI{ | |||
| logic: logic, | |||
| } | |||
| } | |||
| func NewTrickerAPI(logic ILogic) *TrickerAPI { | |||
| return &TrickerAPI{ | |||
| logic: logic, | |||
| } | |||
| } | |||
| func (api *StudentAPI) Move(timeInMilliseconds int64, angleInRadian float64) <-chan bool { | |||
| res := make(chan bool, 1) | |||
| go func() { | |||
| res <- api.logic.Move(timeInMilliseconds, angleInRadian) | |||
| }() | |||
| return res | |||
| } | |||
| func (api *StudentAPI) GetSelfInfo() *thuai6.Student { | |||
| return api.logic.GetStudentSelfInfo() | |||
| } | |||
| func (api *StudentAPI) StartTimer() { | |||
| // Nothing | |||
| } | |||
| func (api *StudentAPI) EndTimer() { | |||
| // Nothing | |||
| } | |||
| func (api *StudentAPI) Play(ai thuai6.IAI) { | |||
| ai.StudentPlay(api) | |||
| } | |||
| func (api *TrickerAPI) Move(timeInMilliseconds int64, angleInRadian float64) <-chan bool { | |||
| res := make(chan bool, 1) | |||
| go func() { | |||
| res <- api.logic.Move(timeInMilliseconds, angleInRadian) | |||
| }() | |||
| return res | |||
| } | |||
| func (api *TrickerAPI) GetSelfInfo() *thuai6.Tricker { | |||
| return api.logic.GetTrickerSelfInfo() | |||
| } | |||
| func (api *TrickerAPI) StartTimer() { | |||
| // Nothing | |||
| } | |||
| func (api *TrickerAPI) EndTimer() { | |||
| // Nothing | |||
| } | |||
| func (api *TrickerAPI) Play(ai thuai6.IAI) { | |||
| ai.TrickerPlay(api) | |||
| } | |||
| @@ -0,0 +1,97 @@ | |||
| package core | |||
| import ( | |||
| pb "API/proto" | |||
| thuai6 "API/thuai6" | |||
| "context" | |||
| "sync" | |||
| "google.golang.org/grpc" | |||
| "google.golang.org/grpc/credentials/insecure" | |||
| ) | |||
| type Communication struct { | |||
| stub pb.AvailableServiceClient | |||
| messageToClient *pb.MessageToClient | |||
| haveNewMessage bool | |||
| mtxMessage sync.Mutex | |||
| cvMessage *sync.Cond | |||
| } | |||
| func NewCommunication(ip string, port string) (*Communication, error) { | |||
| addr := ip + ":" + port | |||
| conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| stub := pb.NewAvailableServiceClient(conn) | |||
| comm := &Communication{stub: stub, messageToClient: nil, haveNewMessage: false, mtxMessage: sync.Mutex{}} | |||
| comm.cvMessage = sync.NewCond(&comm.mtxMessage) | |||
| return comm, nil | |||
| } | |||
| func (self *Communication) TryConnection(playerID int64) bool { | |||
| res, err := self.stub.TryConnection(context.Background(), &pb.IDMsg{PlayerId: playerID}) | |||
| if err != nil { | |||
| // TODO: do loggings | |||
| return false | |||
| } | |||
| return res.GetActSuccess() | |||
| } | |||
| func (self *Communication) AddPlayer(playerID int64, playerType thuai6.PlayerType, studentType thuai6.StudentType, trickerType thuai6.TrickerType) { | |||
| var playerMsg pb.PlayerMsg | |||
| playerMsg.PlayerId = playerID | |||
| playerMsg.PlayerType = thuai6.PlayerTypeToProto[playerType] | |||
| if playerType == thuai6.StudentPlayer { | |||
| playerMsg.JobType = &pb.PlayerMsg_StudentType{StudentType: thuai6.StudentTypeToProto[studentType]} | |||
| } else if playerType == thuai6.TrickerPlayer { | |||
| playerMsg.JobType = &pb.PlayerMsg_TrickerType{TrickerType: thuai6.TrickerTypeToProto[trickerType]} | |||
| } else { | |||
| // TODO: Report ERROR | |||
| } | |||
| go func() { | |||
| msgReader, err := self.stub.AddPlayer(context.Background(), &playerMsg) | |||
| if err != nil { | |||
| // TODO: Report ERROR | |||
| } | |||
| for { | |||
| msg, err := msgReader.Recv() | |||
| if err != nil { | |||
| break | |||
| } | |||
| func() { | |||
| self.mtxMessage.Lock() | |||
| defer self.mtxMessage.Unlock() | |||
| self.messageToClient = msg | |||
| self.haveNewMessage = true | |||
| self.cvMessage.Signal() | |||
| }() | |||
| } | |||
| }() | |||
| } | |||
| func (self *Communication) Move(time int64, angle float64, playerID int64) bool { | |||
| res, err := self.stub.Move(context.Background(), &pb.MoveMsg{ | |||
| TimeInMilliseconds: time, | |||
| Angle: angle, | |||
| PlayerId: playerID, | |||
| }) | |||
| if err != nil { | |||
| // TODO: do loggings | |||
| return false | |||
| } | |||
| return res.GetActSuccess() | |||
| } | |||
| func (self *Communication) GetMessageToClient() pb.MessageToClient { | |||
| self.mtxMessage.Lock() | |||
| defer self.mtxMessage.Unlock() | |||
| for !self.haveNewMessage { | |||
| self.cvMessage.Wait() | |||
| } | |||
| self.haveNewMessage = false | |||
| return *self.messageToClient | |||
| } | |||
| @@ -0,0 +1,202 @@ | |||
| package core | |||
| import ( | |||
| "errors" | |||
| "sync" | |||
| "sync/atomic" | |||
| main "API" | |||
| pb "API/proto" | |||
| thuai6 "API/thuai6" | |||
| ) | |||
| type Logic struct { | |||
| communication *Communication | |||
| playerType thuai6.PlayerType | |||
| playerID int64 | |||
| studentType thuai6.StudentType | |||
| trickerType thuai6.TrickerType | |||
| timer thuai6.IGameTimer | |||
| mtxAI sync.Mutex | |||
| mtxState sync.Mutex | |||
| mtxBuffer sync.Mutex | |||
| cvBuffer *sync.Cond | |||
| cvAI *sync.Cond | |||
| state [2]thuai6.State | |||
| currentState *thuai6.State | |||
| bufferState *thuai6.State | |||
| counterState int32 | |||
| counterBuffer int32 | |||
| gameState thuai6.GameState | |||
| aiStart bool | |||
| bufferUpdated bool | |||
| aiLoop int32 | |||
| freshed int32 | |||
| } | |||
| func NewLogic(playerType thuai6.PlayerType, id int64, tricker thuai6.TrickerType, student thuai6.StudentType) *Logic { | |||
| logic := &Logic{ | |||
| communication: nil, | |||
| playerType: playerType, | |||
| playerID: id, | |||
| studentType: student, | |||
| trickerType: tricker, | |||
| timer: nil, | |||
| mtxAI: sync.Mutex{}, | |||
| mtxState: sync.Mutex{}, | |||
| mtxBuffer: sync.Mutex{}, | |||
| cvBuffer: nil, | |||
| cvAI: nil, | |||
| state: [2]thuai6.State{}, | |||
| counterState: 0, | |||
| counterBuffer: 0, | |||
| gameState: thuai6.NullGameState, | |||
| aiStart: false, | |||
| bufferUpdated: true, | |||
| aiLoop: 1, | |||
| freshed: 0, | |||
| } | |||
| logic.currentState = &logic.state[0] | |||
| logic.bufferState = &logic.state[1] | |||
| logic.cvBuffer = sync.NewCond(&logic.mtxBuffer) | |||
| logic.cvAI = sync.NewCond(&logic.mtxAI) | |||
| return logic | |||
| } | |||
| func (logic *Logic) GetStudentSelfInfo() *thuai6.Student { | |||
| logic.mtxState.Lock() | |||
| defer logic.mtxState.Unlock() | |||
| return logic.currentState.StudentSelf | |||
| } | |||
| func (logic *Logic) GetTrickerSelfInfo() *thuai6.Tricker { | |||
| logic.mtxState.Lock() | |||
| defer logic.mtxState.Unlock() | |||
| return logic.currentState.TrickerSelf | |||
| } | |||
| func (logic *Logic) Move(time int64, angle float64) bool { | |||
| return logic.communication.Move(time, angle, logic.playerID) | |||
| } | |||
| func (logic *Logic) TryConnection() bool { | |||
| return logic.communication.TryConnection(logic.playerID) | |||
| } | |||
| func (logic *Logic) Wait() { | |||
| atomic.StoreInt32(&logic.freshed, 0) | |||
| logic.mtxBuffer.Lock() | |||
| defer logic.mtxBuffer.Unlock() | |||
| for atomic.LoadInt32(&logic.freshed) == 0 { | |||
| logic.cvBuffer.Wait() | |||
| } | |||
| } | |||
| func (logic *Logic) Update() { | |||
| if main.Asynchronous == false { | |||
| logic.mtxBuffer.Lock() | |||
| defer logic.mtxBuffer.Unlock() | |||
| for logic.bufferUpdated == false { | |||
| logic.cvBuffer.Wait() | |||
| } | |||
| // Go 的 defer 是函数推出时执行而非 block 退出时执行,故包装一层 func | |||
| func() { | |||
| logic.mtxState.Lock() | |||
| defer logic.mtxState.Unlock() | |||
| var tmpState = logic.currentState | |||
| logic.currentState = logic.bufferState | |||
| logic.bufferState = tmpState | |||
| logic.counterState = logic.counterBuffer | |||
| }() | |||
| logic.bufferUpdated = false | |||
| } | |||
| } | |||
| func (logic *Logic) ProcessMessage() <-chan int { | |||
| endChan := make(chan int, 1) | |||
| go func() { | |||
| logic.communication.AddPlayer(logic.playerID, logic.playerType, logic.studentType, logic.trickerType) | |||
| for logic.gameState != thuai6.GameEnd { | |||
| clientMsg := logic.communication.GetMessageToClient() | |||
| logic.gameState = thuai6.GameStateToTHUAI6[clientMsg.GameState] | |||
| switch logic.gameState { | |||
| case thuai6.GameStart: | |||
| playerGUIDs := make([]int64, 0) | |||
| for _, obj := range clientMsg.ObjMessage { | |||
| switch obj.MessageOfObj.(type) { | |||
| case *(pb.MessageOfObj_StudentMessage): | |||
| playerGUIDs = append(playerGUIDs, obj.GetStudentMessage().GetGuid()) | |||
| } | |||
| } | |||
| for _, obj := range clientMsg.ObjMessage { | |||
| switch obj.MessageOfObj.(type) { | |||
| case *(pb.MessageOfObj_TrickerMessage): | |||
| playerGUIDs = append(playerGUIDs, obj.GetTrickerMessage().GetGuid()) | |||
| } | |||
| } | |||
| logic.currentState.Guids = playerGUIDs | |||
| logic.bufferState.Guids = playerGUIDs | |||
| // TODO: LoadBuffer | |||
| break | |||
| case thuai6.GameEnd: | |||
| } | |||
| } | |||
| // TODO: ProcessMessage | |||
| endChan <- 0 | |||
| }() | |||
| return endChan | |||
| } | |||
| func (logic *Logic) Main(createAI thuai6.CreateAIFunc, ip string, port string) error { | |||
| comm, err := NewCommunication(ip, port) | |||
| if err != nil { | |||
| return err | |||
| } | |||
| logic.communication = comm | |||
| if logic.playerType == thuai6.StudentPlayer { | |||
| logic.timer = NewStudentAPI(logic) | |||
| } else if logic.playerType == thuai6.TrickerPlayer { | |||
| logic.timer = NewTrickerAPI(logic) | |||
| } else { | |||
| return errors.New("Invalid player type") | |||
| } | |||
| aiThread := func() { | |||
| // Go 的 defer 是函数推出时执行而非 block 退出时执行,故包装一层 func | |||
| func() { | |||
| logic.mtxAI.Lock() | |||
| defer logic.mtxAI.Unlock() | |||
| for logic.aiStart == false { | |||
| logic.cvAI.Wait() | |||
| } | |||
| }() | |||
| ai := createAI(logic.playerID) | |||
| for atomic.LoadInt32(&logic.aiLoop) != 0 { | |||
| if main.Asynchronous { | |||
| logic.Wait() | |||
| } else { | |||
| logic.Update() | |||
| } | |||
| logic.timer.StartTimer() | |||
| logic.timer.Play(ai) | |||
| logic.timer.EndTimer() | |||
| } | |||
| } | |||
| if logic.TryConnection() == false { | |||
| atomic.StoreInt32(&logic.aiLoop, 0) | |||
| return errors.New("Connection failed.") | |||
| } | |||
| aiEnd := make(chan int, 1) | |||
| go func() { | |||
| aiThread() | |||
| aiEnd <- 1 | |||
| }() | |||
| <-logic.ProcessMessage() | |||
| <-aiEnd | |||
| return nil | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| module API | |||
| go 1.18 | |||
| require ( | |||
| github.com/golang/protobuf v1.5.2 // indirect | |||
| golang.org/x/net v0.8.0 // indirect | |||
| golang.org/x/sys v0.6.0 // indirect | |||
| golang.org/x/text v0.8.0 // indirect | |||
| google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect | |||
| google.golang.org/grpc v1.54.0 // indirect | |||
| google.golang.org/protobuf v1.30.0 // indirect | |||
| ) | |||
| @@ -0,0 +1,19 @@ | |||
| github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= | |||
| github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= | |||
| github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= | |||
| github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | |||
| golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= | |||
| golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= | |||
| golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= | |||
| golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |||
| golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= | |||
| golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= | |||
| golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | |||
| google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= | |||
| google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= | |||
| google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= | |||
| google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= | |||
| google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= | |||
| google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= | |||
| google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= | |||
| google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= | |||
| @@ -0,0 +1,18 @@ | |||
| package main | |||
| import ( | |||
| "fmt" | |||
| "log" | |||
| ) | |||
| var ch = make(chan int, 1) | |||
| func Func() { | |||
| log.Println(0) | |||
| ch <- 1 | |||
| log.Fatalln(1) | |||
| } | |||
| func main() { | |||
| fmt.Println("THUAI6") | |||
| } | |||
| @@ -0,0 +1,744 @@ | |||
| // Message2Server | |||
| // Code generated by protoc-gen-go. DO NOT EDIT. | |||
| // versions: | |||
| // protoc-gen-go v1.28.0 | |||
| // protoc (unknown) | |||
| // source: Message2Server.proto | |||
| package proto | |||
| import ( | |||
| protoreflect "google.golang.org/protobuf/reflect/protoreflect" | |||
| protoimpl "google.golang.org/protobuf/runtime/protoimpl" | |||
| reflect "reflect" | |||
| sync "sync" | |||
| ) | |||
| const ( | |||
| // Verify that this generated code is sufficiently up-to-date. | |||
| _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) | |||
| // Verify that runtime/protoimpl is sufficiently up-to-date. | |||
| _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) | |||
| ) | |||
| type PlayerMsg struct { | |||
| state protoimpl.MessageState | |||
| sizeCache protoimpl.SizeCache | |||
| unknownFields protoimpl.UnknownFields | |||
| PlayerId int64 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` | |||
| // Types that are assignable to JobType: | |||
| // *PlayerMsg_StudentType | |||
| // *PlayerMsg_TrickerType | |||
| JobType isPlayerMsg_JobType `protobuf_oneof:"job_type"` | |||
| PlayerType PlayerType `protobuf:"varint,4,opt,name=player_type,json=playerType,proto3,enum=protobuf.PlayerType" json:"player_type,omitempty"` | |||
| } | |||
| func (x *PlayerMsg) Reset() { | |||
| *x = PlayerMsg{} | |||
| if protoimpl.UnsafeEnabled { | |||
| mi := &file_Message2Server_proto_msgTypes[0] | |||
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| ms.StoreMessageInfo(mi) | |||
| } | |||
| } | |||
| func (x *PlayerMsg) String() string { | |||
| return protoimpl.X.MessageStringOf(x) | |||
| } | |||
| func (*PlayerMsg) ProtoMessage() {} | |||
| func (x *PlayerMsg) ProtoReflect() protoreflect.Message { | |||
| mi := &file_Message2Server_proto_msgTypes[0] | |||
| if protoimpl.UnsafeEnabled && x != nil { | |||
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| if ms.LoadMessageInfo() == nil { | |||
| ms.StoreMessageInfo(mi) | |||
| } | |||
| return ms | |||
| } | |||
| return mi.MessageOf(x) | |||
| } | |||
| // Deprecated: Use PlayerMsg.ProtoReflect.Descriptor instead. | |||
| func (*PlayerMsg) Descriptor() ([]byte, []int) { | |||
| return file_Message2Server_proto_rawDescGZIP(), []int{0} | |||
| } | |||
| func (x *PlayerMsg) GetPlayerId() int64 { | |||
| if x != nil { | |||
| return x.PlayerId | |||
| } | |||
| return 0 | |||
| } | |||
| func (m *PlayerMsg) GetJobType() isPlayerMsg_JobType { | |||
| if m != nil { | |||
| return m.JobType | |||
| } | |||
| return nil | |||
| } | |||
| func (x *PlayerMsg) GetStudentType() StudentType { | |||
| if x, ok := x.GetJobType().(*PlayerMsg_StudentType); ok { | |||
| return x.StudentType | |||
| } | |||
| return StudentType_NULL_STUDENT_TYPE | |||
| } | |||
| func (x *PlayerMsg) GetTrickerType() TrickerType { | |||
| if x, ok := x.GetJobType().(*PlayerMsg_TrickerType); ok { | |||
| return x.TrickerType | |||
| } | |||
| return TrickerType_NULL_TRICKER_TYPE | |||
| } | |||
| func (x *PlayerMsg) GetPlayerType() PlayerType { | |||
| if x != nil { | |||
| return x.PlayerType | |||
| } | |||
| return PlayerType_NULL_PLAYER_TYPE | |||
| } | |||
| type isPlayerMsg_JobType interface { | |||
| isPlayerMsg_JobType() | |||
| } | |||
| type PlayerMsg_StudentType struct { | |||
| StudentType StudentType `protobuf:"varint,2,opt,name=student_type,json=studentType,proto3,enum=protobuf.StudentType,oneof"` | |||
| } | |||
| type PlayerMsg_TrickerType struct { | |||
| TrickerType TrickerType `protobuf:"varint,3,opt,name=tricker_type,json=trickerType,proto3,enum=protobuf.TrickerType,oneof"` | |||
| } | |||
| func (*PlayerMsg_StudentType) isPlayerMsg_JobType() {} | |||
| func (*PlayerMsg_TrickerType) isPlayerMsg_JobType() {} | |||
| type MoveMsg struct { | |||
| state protoimpl.MessageState | |||
| sizeCache protoimpl.SizeCache | |||
| unknownFields protoimpl.UnknownFields | |||
| PlayerId int64 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` | |||
| Angle float64 `protobuf:"fixed64,2,opt,name=angle,proto3" json:"angle,omitempty"` | |||
| TimeInMilliseconds int64 `protobuf:"varint,3,opt,name=time_in_milliseconds,json=timeInMilliseconds,proto3" json:"time_in_milliseconds,omitempty"` | |||
| } | |||
| func (x *MoveMsg) Reset() { | |||
| *x = MoveMsg{} | |||
| if protoimpl.UnsafeEnabled { | |||
| mi := &file_Message2Server_proto_msgTypes[1] | |||
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| ms.StoreMessageInfo(mi) | |||
| } | |||
| } | |||
| func (x *MoveMsg) String() string { | |||
| return protoimpl.X.MessageStringOf(x) | |||
| } | |||
| func (*MoveMsg) ProtoMessage() {} | |||
| func (x *MoveMsg) ProtoReflect() protoreflect.Message { | |||
| mi := &file_Message2Server_proto_msgTypes[1] | |||
| if protoimpl.UnsafeEnabled && x != nil { | |||
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| if ms.LoadMessageInfo() == nil { | |||
| ms.StoreMessageInfo(mi) | |||
| } | |||
| return ms | |||
| } | |||
| return mi.MessageOf(x) | |||
| } | |||
| // Deprecated: Use MoveMsg.ProtoReflect.Descriptor instead. | |||
| func (*MoveMsg) Descriptor() ([]byte, []int) { | |||
| return file_Message2Server_proto_rawDescGZIP(), []int{1} | |||
| } | |||
| func (x *MoveMsg) GetPlayerId() int64 { | |||
| if x != nil { | |||
| return x.PlayerId | |||
| } | |||
| return 0 | |||
| } | |||
| func (x *MoveMsg) GetAngle() float64 { | |||
| if x != nil { | |||
| return x.Angle | |||
| } | |||
| return 0 | |||
| } | |||
| func (x *MoveMsg) GetTimeInMilliseconds() int64 { | |||
| if x != nil { | |||
| return x.TimeInMilliseconds | |||
| } | |||
| return 0 | |||
| } | |||
| type PropMsg struct { | |||
| state protoimpl.MessageState | |||
| sizeCache protoimpl.SizeCache | |||
| unknownFields protoimpl.UnknownFields | |||
| PlayerId int64 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` | |||
| PropType PropType `protobuf:"varint,2,opt,name=prop_type,json=propType,proto3,enum=protobuf.PropType" json:"prop_type,omitempty"` | |||
| } | |||
| func (x *PropMsg) Reset() { | |||
| *x = PropMsg{} | |||
| if protoimpl.UnsafeEnabled { | |||
| mi := &file_Message2Server_proto_msgTypes[2] | |||
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| ms.StoreMessageInfo(mi) | |||
| } | |||
| } | |||
| func (x *PropMsg) String() string { | |||
| return protoimpl.X.MessageStringOf(x) | |||
| } | |||
| func (*PropMsg) ProtoMessage() {} | |||
| func (x *PropMsg) ProtoReflect() protoreflect.Message { | |||
| mi := &file_Message2Server_proto_msgTypes[2] | |||
| if protoimpl.UnsafeEnabled && x != nil { | |||
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| if ms.LoadMessageInfo() == nil { | |||
| ms.StoreMessageInfo(mi) | |||
| } | |||
| return ms | |||
| } | |||
| return mi.MessageOf(x) | |||
| } | |||
| // Deprecated: Use PropMsg.ProtoReflect.Descriptor instead. | |||
| func (*PropMsg) Descriptor() ([]byte, []int) { | |||
| return file_Message2Server_proto_rawDescGZIP(), []int{2} | |||
| } | |||
| func (x *PropMsg) GetPlayerId() int64 { | |||
| if x != nil { | |||
| return x.PlayerId | |||
| } | |||
| return 0 | |||
| } | |||
| func (x *PropMsg) GetPropType() PropType { | |||
| if x != nil { | |||
| return x.PropType | |||
| } | |||
| return PropType_NULL_PROP_TYPE | |||
| } | |||
| type SendMsg struct { | |||
| state protoimpl.MessageState | |||
| sizeCache protoimpl.SizeCache | |||
| unknownFields protoimpl.UnknownFields | |||
| PlayerId int64 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` | |||
| ToPlayerId int64 `protobuf:"varint,2,opt,name=to_player_id,json=toPlayerId,proto3" json:"to_player_id,omitempty"` | |||
| Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` | |||
| } | |||
| func (x *SendMsg) Reset() { | |||
| *x = SendMsg{} | |||
| if protoimpl.UnsafeEnabled { | |||
| mi := &file_Message2Server_proto_msgTypes[3] | |||
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| ms.StoreMessageInfo(mi) | |||
| } | |||
| } | |||
| func (x *SendMsg) String() string { | |||
| return protoimpl.X.MessageStringOf(x) | |||
| } | |||
| func (*SendMsg) ProtoMessage() {} | |||
| func (x *SendMsg) ProtoReflect() protoreflect.Message { | |||
| mi := &file_Message2Server_proto_msgTypes[3] | |||
| if protoimpl.UnsafeEnabled && x != nil { | |||
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| if ms.LoadMessageInfo() == nil { | |||
| ms.StoreMessageInfo(mi) | |||
| } | |||
| return ms | |||
| } | |||
| return mi.MessageOf(x) | |||
| } | |||
| // Deprecated: Use SendMsg.ProtoReflect.Descriptor instead. | |||
| func (*SendMsg) Descriptor() ([]byte, []int) { | |||
| return file_Message2Server_proto_rawDescGZIP(), []int{3} | |||
| } | |||
| func (x *SendMsg) GetPlayerId() int64 { | |||
| if x != nil { | |||
| return x.PlayerId | |||
| } | |||
| return 0 | |||
| } | |||
| func (x *SendMsg) GetToPlayerId() int64 { | |||
| if x != nil { | |||
| return x.ToPlayerId | |||
| } | |||
| return 0 | |||
| } | |||
| func (x *SendMsg) GetMessage() string { | |||
| if x != nil { | |||
| return x.Message | |||
| } | |||
| return "" | |||
| } | |||
| type AttackMsg struct { | |||
| state protoimpl.MessageState | |||
| sizeCache protoimpl.SizeCache | |||
| unknownFields protoimpl.UnknownFields | |||
| PlayerId int64 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` | |||
| Angle float64 `protobuf:"fixed64,2,opt,name=angle,proto3" json:"angle,omitempty"` | |||
| } | |||
| func (x *AttackMsg) Reset() { | |||
| *x = AttackMsg{} | |||
| if protoimpl.UnsafeEnabled { | |||
| mi := &file_Message2Server_proto_msgTypes[4] | |||
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| ms.StoreMessageInfo(mi) | |||
| } | |||
| } | |||
| func (x *AttackMsg) String() string { | |||
| return protoimpl.X.MessageStringOf(x) | |||
| } | |||
| func (*AttackMsg) ProtoMessage() {} | |||
| func (x *AttackMsg) ProtoReflect() protoreflect.Message { | |||
| mi := &file_Message2Server_proto_msgTypes[4] | |||
| if protoimpl.UnsafeEnabled && x != nil { | |||
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| if ms.LoadMessageInfo() == nil { | |||
| ms.StoreMessageInfo(mi) | |||
| } | |||
| return ms | |||
| } | |||
| return mi.MessageOf(x) | |||
| } | |||
| // Deprecated: Use AttackMsg.ProtoReflect.Descriptor instead. | |||
| func (*AttackMsg) Descriptor() ([]byte, []int) { | |||
| return file_Message2Server_proto_rawDescGZIP(), []int{4} | |||
| } | |||
| func (x *AttackMsg) GetPlayerId() int64 { | |||
| if x != nil { | |||
| return x.PlayerId | |||
| } | |||
| return 0 | |||
| } | |||
| func (x *AttackMsg) GetAngle() float64 { | |||
| if x != nil { | |||
| return x.Angle | |||
| } | |||
| return 0 | |||
| } | |||
| type IDMsg struct { | |||
| state protoimpl.MessageState | |||
| sizeCache protoimpl.SizeCache | |||
| unknownFields protoimpl.UnknownFields | |||
| PlayerId int64 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` | |||
| } | |||
| func (x *IDMsg) Reset() { | |||
| *x = IDMsg{} | |||
| if protoimpl.UnsafeEnabled { | |||
| mi := &file_Message2Server_proto_msgTypes[5] | |||
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| ms.StoreMessageInfo(mi) | |||
| } | |||
| } | |||
| func (x *IDMsg) String() string { | |||
| return protoimpl.X.MessageStringOf(x) | |||
| } | |||
| func (*IDMsg) ProtoMessage() {} | |||
| func (x *IDMsg) ProtoReflect() protoreflect.Message { | |||
| mi := &file_Message2Server_proto_msgTypes[5] | |||
| if protoimpl.UnsafeEnabled && x != nil { | |||
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| if ms.LoadMessageInfo() == nil { | |||
| ms.StoreMessageInfo(mi) | |||
| } | |||
| return ms | |||
| } | |||
| return mi.MessageOf(x) | |||
| } | |||
| // Deprecated: Use IDMsg.ProtoReflect.Descriptor instead. | |||
| func (*IDMsg) Descriptor() ([]byte, []int) { | |||
| return file_Message2Server_proto_rawDescGZIP(), []int{5} | |||
| } | |||
| func (x *IDMsg) GetPlayerId() int64 { | |||
| if x != nil { | |||
| return x.PlayerId | |||
| } | |||
| return 0 | |||
| } | |||
| type TreatAndRescueMsg struct { | |||
| state protoimpl.MessageState | |||
| sizeCache protoimpl.SizeCache | |||
| unknownFields protoimpl.UnknownFields | |||
| PlayerId int64 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` | |||
| ToPlayerId int64 `protobuf:"varint,2,opt,name=to_player_id,json=toPlayerId,proto3" json:"to_player_id,omitempty"` | |||
| } | |||
| func (x *TreatAndRescueMsg) Reset() { | |||
| *x = TreatAndRescueMsg{} | |||
| if protoimpl.UnsafeEnabled { | |||
| mi := &file_Message2Server_proto_msgTypes[6] | |||
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| ms.StoreMessageInfo(mi) | |||
| } | |||
| } | |||
| func (x *TreatAndRescueMsg) String() string { | |||
| return protoimpl.X.MessageStringOf(x) | |||
| } | |||
| func (*TreatAndRescueMsg) ProtoMessage() {} | |||
| func (x *TreatAndRescueMsg) ProtoReflect() protoreflect.Message { | |||
| mi := &file_Message2Server_proto_msgTypes[6] | |||
| if protoimpl.UnsafeEnabled && x != nil { | |||
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| if ms.LoadMessageInfo() == nil { | |||
| ms.StoreMessageInfo(mi) | |||
| } | |||
| return ms | |||
| } | |||
| return mi.MessageOf(x) | |||
| } | |||
| // Deprecated: Use TreatAndRescueMsg.ProtoReflect.Descriptor instead. | |||
| func (*TreatAndRescueMsg) Descriptor() ([]byte, []int) { | |||
| return file_Message2Server_proto_rawDescGZIP(), []int{6} | |||
| } | |||
| func (x *TreatAndRescueMsg) GetPlayerId() int64 { | |||
| if x != nil { | |||
| return x.PlayerId | |||
| } | |||
| return 0 | |||
| } | |||
| func (x *TreatAndRescueMsg) GetToPlayerId() int64 { | |||
| if x != nil { | |||
| return x.ToPlayerId | |||
| } | |||
| return 0 | |||
| } | |||
| type SkillMsg struct { | |||
| state protoimpl.MessageState | |||
| sizeCache protoimpl.SizeCache | |||
| unknownFields protoimpl.UnknownFields | |||
| PlayerId int64 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` | |||
| SkillId int32 `protobuf:"varint,2,opt,name=skill_id,json=skillId,proto3" json:"skill_id,omitempty"` | |||
| } | |||
| func (x *SkillMsg) Reset() { | |||
| *x = SkillMsg{} | |||
| if protoimpl.UnsafeEnabled { | |||
| mi := &file_Message2Server_proto_msgTypes[7] | |||
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| ms.StoreMessageInfo(mi) | |||
| } | |||
| } | |||
| func (x *SkillMsg) String() string { | |||
| return protoimpl.X.MessageStringOf(x) | |||
| } | |||
| func (*SkillMsg) ProtoMessage() {} | |||
| func (x *SkillMsg) ProtoReflect() protoreflect.Message { | |||
| mi := &file_Message2Server_proto_msgTypes[7] | |||
| if protoimpl.UnsafeEnabled && x != nil { | |||
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| if ms.LoadMessageInfo() == nil { | |||
| ms.StoreMessageInfo(mi) | |||
| } | |||
| return ms | |||
| } | |||
| return mi.MessageOf(x) | |||
| } | |||
| // Deprecated: Use SkillMsg.ProtoReflect.Descriptor instead. | |||
| func (*SkillMsg) Descriptor() ([]byte, []int) { | |||
| return file_Message2Server_proto_rawDescGZIP(), []int{7} | |||
| } | |||
| func (x *SkillMsg) GetPlayerId() int64 { | |||
| if x != nil { | |||
| return x.PlayerId | |||
| } | |||
| return 0 | |||
| } | |||
| func (x *SkillMsg) GetSkillId() int32 { | |||
| if x != nil { | |||
| return x.SkillId | |||
| } | |||
| return 0 | |||
| } | |||
| var File_Message2Server_proto protoreflect.FileDescriptor | |||
| var file_Message2Server_proto_rawDesc = []byte{ | |||
| 0x0a, 0x14, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, | |||
| 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, | |||
| 0x1a, 0x11, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, | |||
| 0x6f, 0x74, 0x6f, 0x22, 0xe3, 0x01, 0x0a, 0x09, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, 0x73, | |||
| 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, | |||
| 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x12, 0x3a, | |||
| 0x0a, 0x0c, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, | |||
| 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, | |||
| 0x53, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x73, | |||
| 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3a, 0x0a, 0x0c, 0x74, 0x72, | |||
| 0x69, 0x63, 0x6b, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, | |||
| 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x72, 0x69, 0x63, | |||
| 0x6b, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x72, 0x69, 0x63, 0x6b, | |||
| 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, | |||
| 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x70, 0x72, | |||
| 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x54, 0x79, 0x70, | |||
| 0x65, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0a, 0x0a, | |||
| 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x6e, 0x0a, 0x07, 0x4d, 0x6f, 0x76, | |||
| 0x65, 0x4d, 0x73, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x69, | |||
| 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, | |||
| 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6e, 0x67, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, | |||
| 0x52, 0x05, 0x61, 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x69, 0x6d, 0x65, 0x5f, | |||
| 0x69, 0x6e, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, | |||
| 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x4d, 0x69, 0x6c, | |||
| 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x57, 0x0a, 0x07, 0x50, 0x72, 0x6f, | |||
| 0x70, 0x4d, 0x73, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x69, | |||
| 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, | |||
| 0x64, 0x12, 0x2f, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, | |||
| 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, | |||
| 0x50, 0x72, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x54, 0x79, | |||
| 0x70, 0x65, 0x22, 0x62, 0x0a, 0x07, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x1b, 0x0a, | |||
| 0x09, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, | |||
| 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x6f, | |||
| 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, | |||
| 0x52, 0x0a, 0x74, 0x6f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, | |||
| 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, | |||
| 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3e, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, | |||
| 0x4d, 0x73, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x69, 0x64, | |||
| 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, | |||
| 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6e, 0x67, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, | |||
| 0x05, 0x61, 0x6e, 0x67, 0x6c, 0x65, 0x22, 0x24, 0x0a, 0x05, 0x49, 0x44, 0x4d, 0x73, 0x67, 0x12, | |||
| 0x1b, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, | |||
| 0x28, 0x03, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x22, 0x52, 0x0a, 0x11, | |||
| 0x54, 0x72, 0x65, 0x61, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x63, 0x75, 0x65, 0x4d, 0x73, | |||
| 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, | |||
| 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, | |||
| 0x0a, 0x0c, 0x74, 0x6f, 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, | |||
| 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, | |||
| 0x22, 0x42, 0x0a, 0x08, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x1b, 0x0a, 0x09, | |||
| 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, | |||
| 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x6b, 0x69, | |||
| 0x6c, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6b, 0x69, | |||
| 0x6c, 0x6c, 0x49, 0x64, 0x42, 0x72, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, | |||
| 0x6f, 0x62, 0x75, 0x66, 0x42, 0x13, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x53, 0x65, | |||
| 0x72, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x0d, 0x6a, 0x6f, 0x62, | |||
| 0x2d, 0x41, 0x50, 0x49, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, | |||
| 0xaa, 0x02, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0xca, 0x02, 0x08, 0x50, 0x72, | |||
| 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0xe2, 0x02, 0x14, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, | |||
| 0x66, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, | |||
| 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | |||
| } | |||
| var ( | |||
| file_Message2Server_proto_rawDescOnce sync.Once | |||
| file_Message2Server_proto_rawDescData = file_Message2Server_proto_rawDesc | |||
| ) | |||
| func file_Message2Server_proto_rawDescGZIP() []byte { | |||
| file_Message2Server_proto_rawDescOnce.Do(func() { | |||
| file_Message2Server_proto_rawDescData = protoimpl.X.CompressGZIP(file_Message2Server_proto_rawDescData) | |||
| }) | |||
| return file_Message2Server_proto_rawDescData | |||
| } | |||
| var file_Message2Server_proto_msgTypes = make([]protoimpl.MessageInfo, 8) | |||
| var file_Message2Server_proto_goTypes = []interface{}{ | |||
| (*PlayerMsg)(nil), // 0: protobuf.PlayerMsg | |||
| (*MoveMsg)(nil), // 1: protobuf.MoveMsg | |||
| (*PropMsg)(nil), // 2: protobuf.PropMsg | |||
| (*SendMsg)(nil), // 3: protobuf.SendMsg | |||
| (*AttackMsg)(nil), // 4: protobuf.AttackMsg | |||
| (*IDMsg)(nil), // 5: protobuf.IDMsg | |||
| (*TreatAndRescueMsg)(nil), // 6: protobuf.TreatAndRescueMsg | |||
| (*SkillMsg)(nil), // 7: protobuf.SkillMsg | |||
| (StudentType)(0), // 8: protobuf.StudentType | |||
| (TrickerType)(0), // 9: protobuf.TrickerType | |||
| (PlayerType)(0), // 10: protobuf.PlayerType | |||
| (PropType)(0), // 11: protobuf.PropType | |||
| } | |||
| var file_Message2Server_proto_depIdxs = []int32{ | |||
| 8, // 0: protobuf.PlayerMsg.student_type:type_name -> protobuf.StudentType | |||
| 9, // 1: protobuf.PlayerMsg.tricker_type:type_name -> protobuf.TrickerType | |||
| 10, // 2: protobuf.PlayerMsg.player_type:type_name -> protobuf.PlayerType | |||
| 11, // 3: protobuf.PropMsg.prop_type:type_name -> protobuf.PropType | |||
| 4, // [4:4] is the sub-list for method output_type | |||
| 4, // [4:4] is the sub-list for method input_type | |||
| 4, // [4:4] is the sub-list for extension type_name | |||
| 4, // [4:4] is the sub-list for extension extendee | |||
| 0, // [0:4] is the sub-list for field type_name | |||
| } | |||
| func init() { file_Message2Server_proto_init() } | |||
| func file_Message2Server_proto_init() { | |||
| if File_Message2Server_proto != nil { | |||
| return | |||
| } | |||
| file_MessageType_proto_init() | |||
| if !protoimpl.UnsafeEnabled { | |||
| file_Message2Server_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { | |||
| switch v := v.(*PlayerMsg); i { | |||
| case 0: | |||
| return &v.state | |||
| case 1: | |||
| return &v.sizeCache | |||
| case 2: | |||
| return &v.unknownFields | |||
| default: | |||
| return nil | |||
| } | |||
| } | |||
| file_Message2Server_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { | |||
| switch v := v.(*MoveMsg); i { | |||
| case 0: | |||
| return &v.state | |||
| case 1: | |||
| return &v.sizeCache | |||
| case 2: | |||
| return &v.unknownFields | |||
| default: | |||
| return nil | |||
| } | |||
| } | |||
| file_Message2Server_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { | |||
| switch v := v.(*PropMsg); i { | |||
| case 0: | |||
| return &v.state | |||
| case 1: | |||
| return &v.sizeCache | |||
| case 2: | |||
| return &v.unknownFields | |||
| default: | |||
| return nil | |||
| } | |||
| } | |||
| file_Message2Server_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { | |||
| switch v := v.(*SendMsg); i { | |||
| case 0: | |||
| return &v.state | |||
| case 1: | |||
| return &v.sizeCache | |||
| case 2: | |||
| return &v.unknownFields | |||
| default: | |||
| return nil | |||
| } | |||
| } | |||
| file_Message2Server_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { | |||
| switch v := v.(*AttackMsg); i { | |||
| case 0: | |||
| return &v.state | |||
| case 1: | |||
| return &v.sizeCache | |||
| case 2: | |||
| return &v.unknownFields | |||
| default: | |||
| return nil | |||
| } | |||
| } | |||
| file_Message2Server_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { | |||
| switch v := v.(*IDMsg); i { | |||
| case 0: | |||
| return &v.state | |||
| case 1: | |||
| return &v.sizeCache | |||
| case 2: | |||
| return &v.unknownFields | |||
| default: | |||
| return nil | |||
| } | |||
| } | |||
| file_Message2Server_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { | |||
| switch v := v.(*TreatAndRescueMsg); i { | |||
| case 0: | |||
| return &v.state | |||
| case 1: | |||
| return &v.sizeCache | |||
| case 2: | |||
| return &v.unknownFields | |||
| default: | |||
| return nil | |||
| } | |||
| } | |||
| file_Message2Server_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { | |||
| switch v := v.(*SkillMsg); i { | |||
| case 0: | |||
| return &v.state | |||
| case 1: | |||
| return &v.sizeCache | |||
| case 2: | |||
| return &v.unknownFields | |||
| default: | |||
| return nil | |||
| } | |||
| } | |||
| } | |||
| file_Message2Server_proto_msgTypes[0].OneofWrappers = []interface{}{ | |||
| (*PlayerMsg_StudentType)(nil), | |||
| (*PlayerMsg_TrickerType)(nil), | |||
| } | |||
| type x struct{} | |||
| out := protoimpl.TypeBuilder{ | |||
| File: protoimpl.DescBuilder{ | |||
| GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | |||
| RawDescriptor: file_Message2Server_proto_rawDesc, | |||
| NumEnums: 0, | |||
| NumMessages: 8, | |||
| NumExtensions: 0, | |||
| NumServices: 0, | |||
| }, | |||
| GoTypes: file_Message2Server_proto_goTypes, | |||
| DependencyIndexes: file_Message2Server_proto_depIdxs, | |||
| MessageInfos: file_Message2Server_proto_msgTypes, | |||
| }.Build() | |||
| File_Message2Server_proto = out.File | |||
| file_Message2Server_proto_rawDesc = nil | |||
| file_Message2Server_proto_goTypes = nil | |||
| file_Message2Server_proto_depIdxs = nil | |||
| } | |||
| @@ -0,0 +1,867 @@ | |||
| // MessageType | |||
| // Code generated by protoc-gen-go. DO NOT EDIT. | |||
| // versions: | |||
| // protoc-gen-go v1.28.0 | |||
| // protoc (unknown) | |||
| // source: MessageType.proto | |||
| package proto | |||
| import ( | |||
| protoreflect "google.golang.org/protobuf/reflect/protoreflect" | |||
| protoimpl "google.golang.org/protobuf/runtime/protoimpl" | |||
| reflect "reflect" | |||
| sync "sync" | |||
| ) | |||
| const ( | |||
| // Verify that this generated code is sufficiently up-to-date. | |||
| _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) | |||
| // Verify that runtime/protoimpl is sufficiently up-to-date. | |||
| _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) | |||
| ) | |||
| type BulletType int32 | |||
| const ( | |||
| BulletType_NULL_BULLET_TYPE BulletType = 0 | |||
| BulletType_FLYING_KNIFE BulletType = 1 | |||
| BulletType_COMMON_ATTACK_OF_TRICKER BulletType = 2 | |||
| BulletType_BOMB_BOMB BulletType = 3 | |||
| BulletType_JUMPY_DUMPTY BulletType = 4 | |||
| BulletType_ATOM_BOMB BulletType = 5 | |||
| ) | |||
| // Enum value maps for BulletType. | |||
| var ( | |||
| BulletType_name = map[int32]string{ | |||
| 0: "NULL_BULLET_TYPE", | |||
| 1: "FLYING_KNIFE", | |||
| 2: "COMMON_ATTACK_OF_TRICKER", | |||
| 3: "BOMB_BOMB", | |||
| 4: "JUMPY_DUMPTY", | |||
| 5: "ATOM_BOMB", | |||
| } | |||
| BulletType_value = map[string]int32{ | |||
| "NULL_BULLET_TYPE": 0, | |||
| "FLYING_KNIFE": 1, | |||
| "COMMON_ATTACK_OF_TRICKER": 2, | |||
| "BOMB_BOMB": 3, | |||
| "JUMPY_DUMPTY": 4, | |||
| "ATOM_BOMB": 5, | |||
| } | |||
| ) | |||
| func (x BulletType) Enum() *BulletType { | |||
| p := new(BulletType) | |||
| *p = x | |||
| return p | |||
| } | |||
| func (x BulletType) String() string { | |||
| return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | |||
| } | |||
| func (BulletType) Descriptor() protoreflect.EnumDescriptor { | |||
| return file_MessageType_proto_enumTypes[0].Descriptor() | |||
| } | |||
| func (BulletType) Type() protoreflect.EnumType { | |||
| return &file_MessageType_proto_enumTypes[0] | |||
| } | |||
| func (x BulletType) Number() protoreflect.EnumNumber { | |||
| return protoreflect.EnumNumber(x) | |||
| } | |||
| // Deprecated: Use BulletType.Descriptor instead. | |||
| func (BulletType) EnumDescriptor() ([]byte, []int) { | |||
| return file_MessageType_proto_rawDescGZIP(), []int{0} | |||
| } | |||
| type PlaceType int32 | |||
| const ( | |||
| PlaceType_NULL_PLACE_TYPE PlaceType = 0 | |||
| // 地图情况,其中Gate是总体的大门,HiddenGate是地窖 | |||
| PlaceType_LAND PlaceType = 1 | |||
| PlaceType_WALL PlaceType = 2 | |||
| PlaceType_GRASS PlaceType = 3 | |||
| PlaceType_CLASSROOM PlaceType = 4 | |||
| PlaceType_GATE PlaceType = 5 | |||
| PlaceType_HIDDEN_GATE PlaceType = 6 | |||
| PlaceType_WINDOW PlaceType = 7 | |||
| PlaceType_DOOR3 PlaceType = 8 | |||
| PlaceType_DOOR5 PlaceType = 9 | |||
| PlaceType_DOOR6 PlaceType = 10 | |||
| PlaceType_CHEST PlaceType = 11 // 待补充有特殊效果的地形 | |||
| ) | |||
| // Enum value maps for PlaceType. | |||
| var ( | |||
| PlaceType_name = map[int32]string{ | |||
| 0: "NULL_PLACE_TYPE", | |||
| 1: "LAND", | |||
| 2: "WALL", | |||
| 3: "GRASS", | |||
| 4: "CLASSROOM", | |||
| 5: "GATE", | |||
| 6: "HIDDEN_GATE", | |||
| 7: "WINDOW", | |||
| 8: "DOOR3", | |||
| 9: "DOOR5", | |||
| 10: "DOOR6", | |||
| 11: "CHEST", | |||
| } | |||
| PlaceType_value = map[string]int32{ | |||
| "NULL_PLACE_TYPE": 0, | |||
| "LAND": 1, | |||
| "WALL": 2, | |||
| "GRASS": 3, | |||
| "CLASSROOM": 4, | |||
| "GATE": 5, | |||
| "HIDDEN_GATE": 6, | |||
| "WINDOW": 7, | |||
| "DOOR3": 8, | |||
| "DOOR5": 9, | |||
| "DOOR6": 10, | |||
| "CHEST": 11, | |||
| } | |||
| ) | |||
| func (x PlaceType) Enum() *PlaceType { | |||
| p := new(PlaceType) | |||
| *p = x | |||
| return p | |||
| } | |||
| func (x PlaceType) String() string { | |||
| return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | |||
| } | |||
| func (PlaceType) Descriptor() protoreflect.EnumDescriptor { | |||
| return file_MessageType_proto_enumTypes[1].Descriptor() | |||
| } | |||
| func (PlaceType) Type() protoreflect.EnumType { | |||
| return &file_MessageType_proto_enumTypes[1] | |||
| } | |||
| func (x PlaceType) Number() protoreflect.EnumNumber { | |||
| return protoreflect.EnumNumber(x) | |||
| } | |||
| // Deprecated: Use PlaceType.Descriptor instead. | |||
| func (PlaceType) EnumDescriptor() ([]byte, []int) { | |||
| return file_MessageType_proto_rawDescGZIP(), []int{1} | |||
| } | |||
| type ShapeType int32 | |||
| const ( | |||
| ShapeType_NULL_SHAPE_TYPE ShapeType = 0 | |||
| ShapeType_CIRCLE ShapeType = 1 // 人类、屠夫、可拾取道具等为圆形 | |||
| ShapeType_SQUARE ShapeType = 2 // 地形均为方形 | |||
| ) | |||
| // Enum value maps for ShapeType. | |||
| var ( | |||
| ShapeType_name = map[int32]string{ | |||
| 0: "NULL_SHAPE_TYPE", | |||
| 1: "CIRCLE", | |||
| 2: "SQUARE", | |||
| } | |||
| ShapeType_value = map[string]int32{ | |||
| "NULL_SHAPE_TYPE": 0, | |||
| "CIRCLE": 1, | |||
| "SQUARE": 2, | |||
| } | |||
| ) | |||
| func (x ShapeType) Enum() *ShapeType { | |||
| p := new(ShapeType) | |||
| *p = x | |||
| return p | |||
| } | |||
| func (x ShapeType) String() string { | |||
| return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | |||
| } | |||
| func (ShapeType) Descriptor() protoreflect.EnumDescriptor { | |||
| return file_MessageType_proto_enumTypes[2].Descriptor() | |||
| } | |||
| func (ShapeType) Type() protoreflect.EnumType { | |||
| return &file_MessageType_proto_enumTypes[2] | |||
| } | |||
| func (x ShapeType) Number() protoreflect.EnumNumber { | |||
| return protoreflect.EnumNumber(x) | |||
| } | |||
| // Deprecated: Use ShapeType.Descriptor instead. | |||
| func (ShapeType) EnumDescriptor() ([]byte, []int) { | |||
| return file_MessageType_proto_rawDescGZIP(), []int{2} | |||
| } | |||
| type PropType int32 | |||
| const ( | |||
| PropType_NULL_PROP_TYPE PropType = 0 | |||
| PropType_ADD_SPEED PropType = 1 | |||
| PropType_ADD_LIFE_OR_CLAIRAUDIENCE PropType = 2 | |||
| PropType_ADD_HP_OR_AP PropType = 3 | |||
| PropType_SHIELD_OR_SPEAR PropType = 4 | |||
| PropType_KEY3 PropType = 5 | |||
| PropType_KEY5 PropType = 6 | |||
| PropType_KEY6 PropType = 7 | |||
| PropType_RECOVERY_FROM_DIZZINESS PropType = 8 | |||
| ) | |||
| // Enum value maps for PropType. | |||
| var ( | |||
| PropType_name = map[int32]string{ | |||
| 0: "NULL_PROP_TYPE", | |||
| 1: "ADD_SPEED", | |||
| 2: "ADD_LIFE_OR_CLAIRAUDIENCE", | |||
| 3: "ADD_HP_OR_AP", | |||
| 4: "SHIELD_OR_SPEAR", | |||
| 5: "KEY3", | |||
| 6: "KEY5", | |||
| 7: "KEY6", | |||
| 8: "RECOVERY_FROM_DIZZINESS", | |||
| } | |||
| PropType_value = map[string]int32{ | |||
| "NULL_PROP_TYPE": 0, | |||
| "ADD_SPEED": 1, | |||
| "ADD_LIFE_OR_CLAIRAUDIENCE": 2, | |||
| "ADD_HP_OR_AP": 3, | |||
| "SHIELD_OR_SPEAR": 4, | |||
| "KEY3": 5, | |||
| "KEY5": 6, | |||
| "KEY6": 7, | |||
| "RECOVERY_FROM_DIZZINESS": 8, | |||
| } | |||
| ) | |||
| func (x PropType) Enum() *PropType { | |||
| p := new(PropType) | |||
| *p = x | |||
| return p | |||
| } | |||
| func (x PropType) String() string { | |||
| return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | |||
| } | |||
| func (PropType) Descriptor() protoreflect.EnumDescriptor { | |||
| return file_MessageType_proto_enumTypes[3].Descriptor() | |||
| } | |||
| func (PropType) Type() protoreflect.EnumType { | |||
| return &file_MessageType_proto_enumTypes[3] | |||
| } | |||
| func (x PropType) Number() protoreflect.EnumNumber { | |||
| return protoreflect.EnumNumber(x) | |||
| } | |||
| // Deprecated: Use PropType.Descriptor instead. | |||
| func (PropType) EnumDescriptor() ([]byte, []int) { | |||
| return file_MessageType_proto_rawDescGZIP(), []int{3} | |||
| } | |||
| type StudentBuffType int32 | |||
| const ( | |||
| StudentBuffType_NULL_SBUFF_TYPE StudentBuffType = 0 | |||
| StudentBuffType_STUDENT_ADD_SPEED StudentBuffType = 1 | |||
| StudentBuffType_ADD_LIFE StudentBuffType = 2 | |||
| StudentBuffType_SHIELD StudentBuffType = 3 | |||
| StudentBuffType_STUDENT_INVISIBLE StudentBuffType = 4 | |||
| ) | |||
| // Enum value maps for StudentBuffType. | |||
| var ( | |||
| StudentBuffType_name = map[int32]string{ | |||
| 0: "NULL_SBUFF_TYPE", | |||
| 1: "STUDENT_ADD_SPEED", | |||
| 2: "ADD_LIFE", | |||
| 3: "SHIELD", | |||
| 4: "STUDENT_INVISIBLE", | |||
| } | |||
| StudentBuffType_value = map[string]int32{ | |||
| "NULL_SBUFF_TYPE": 0, | |||
| "STUDENT_ADD_SPEED": 1, | |||
| "ADD_LIFE": 2, | |||
| "SHIELD": 3, | |||
| "STUDENT_INVISIBLE": 4, | |||
| } | |||
| ) | |||
| func (x StudentBuffType) Enum() *StudentBuffType { | |||
| p := new(StudentBuffType) | |||
| *p = x | |||
| return p | |||
| } | |||
| func (x StudentBuffType) String() string { | |||
| return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | |||
| } | |||
| func (StudentBuffType) Descriptor() protoreflect.EnumDescriptor { | |||
| return file_MessageType_proto_enumTypes[4].Descriptor() | |||
| } | |||
| func (StudentBuffType) Type() protoreflect.EnumType { | |||
| return &file_MessageType_proto_enumTypes[4] | |||
| } | |||
| func (x StudentBuffType) Number() protoreflect.EnumNumber { | |||
| return protoreflect.EnumNumber(x) | |||
| } | |||
| // Deprecated: Use StudentBuffType.Descriptor instead. | |||
| func (StudentBuffType) EnumDescriptor() ([]byte, []int) { | |||
| return file_MessageType_proto_rawDescGZIP(), []int{4} | |||
| } | |||
| type PlayerState int32 | |||
| const ( | |||
| PlayerState_NULL_STATUS PlayerState = 0 | |||
| PlayerState_IDLE PlayerState = 1 // 正常状态 | |||
| PlayerState_LEARNING PlayerState = 2 // 学习状态,相当于在修机器 | |||
| PlayerState_ADDICTED PlayerState = 3 // 血条归零后原地沉迷游戏 | |||
| PlayerState_QUIT PlayerState = 4 // 退学状态,相当于寄了 | |||
| PlayerState_GRADUATED PlayerState = 5 // 毕业状态,相当于逃脱了 | |||
| PlayerState_TREATED PlayerState = 6 | |||
| PlayerState_RESCUED PlayerState = 7 | |||
| PlayerState_STUNNED PlayerState = 8 | |||
| PlayerState_TREATING PlayerState = 9 | |||
| PlayerState_RESCUING PlayerState = 10 | |||
| PlayerState_SWINGING PlayerState = 11 // 后摇 | |||
| PlayerState_ATTACKING PlayerState = 12 // 前摇 | |||
| PlayerState_LOCKING PlayerState = 13 | |||
| PlayerState_RUMMAGING PlayerState = 14 | |||
| PlayerState_CLIMBING PlayerState = 15 // 翻窗 | |||
| PlayerState_OPENING_A_CHEST PlayerState = 16 | |||
| PlayerState_USING_SPECIAL_SKILL PlayerState = 17 | |||
| PlayerState_OPENING_A_GATE PlayerState = 18 | |||
| ) | |||
| // Enum value maps for PlayerState. | |||
| var ( | |||
| PlayerState_name = map[int32]string{ | |||
| 0: "NULL_STATUS", | |||
| 1: "IDLE", | |||
| 2: "LEARNING", | |||
| 3: "ADDICTED", | |||
| 4: "QUIT", | |||
| 5: "GRADUATED", | |||
| 6: "TREATED", | |||
| 7: "RESCUED", | |||
| 8: "STUNNED", | |||
| 9: "TREATING", | |||
| 10: "RESCUING", | |||
| 11: "SWINGING", | |||
| 12: "ATTACKING", | |||
| 13: "LOCKING", | |||
| 14: "RUMMAGING", | |||
| 15: "CLIMBING", | |||
| 16: "OPENING_A_CHEST", | |||
| 17: "USING_SPECIAL_SKILL", | |||
| 18: "OPENING_A_GATE", | |||
| } | |||
| PlayerState_value = map[string]int32{ | |||
| "NULL_STATUS": 0, | |||
| "IDLE": 1, | |||
| "LEARNING": 2, | |||
| "ADDICTED": 3, | |||
| "QUIT": 4, | |||
| "GRADUATED": 5, | |||
| "TREATED": 6, | |||
| "RESCUED": 7, | |||
| "STUNNED": 8, | |||
| "TREATING": 9, | |||
| "RESCUING": 10, | |||
| "SWINGING": 11, | |||
| "ATTACKING": 12, | |||
| "LOCKING": 13, | |||
| "RUMMAGING": 14, | |||
| "CLIMBING": 15, | |||
| "OPENING_A_CHEST": 16, | |||
| "USING_SPECIAL_SKILL": 17, | |||
| "OPENING_A_GATE": 18, | |||
| } | |||
| ) | |||
| func (x PlayerState) Enum() *PlayerState { | |||
| p := new(PlayerState) | |||
| *p = x | |||
| return p | |||
| } | |||
| func (x PlayerState) String() string { | |||
| return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | |||
| } | |||
| func (PlayerState) Descriptor() protoreflect.EnumDescriptor { | |||
| return file_MessageType_proto_enumTypes[5].Descriptor() | |||
| } | |||
| func (PlayerState) Type() protoreflect.EnumType { | |||
| return &file_MessageType_proto_enumTypes[5] | |||
| } | |||
| func (x PlayerState) Number() protoreflect.EnumNumber { | |||
| return protoreflect.EnumNumber(x) | |||
| } | |||
| // Deprecated: Use PlayerState.Descriptor instead. | |||
| func (PlayerState) EnumDescriptor() ([]byte, []int) { | |||
| return file_MessageType_proto_rawDescGZIP(), []int{5} | |||
| } | |||
| type TrickerBuffType int32 | |||
| const ( | |||
| TrickerBuffType_NULL_TBUFF_TYPE TrickerBuffType = 0 | |||
| TrickerBuffType_TRICKER_ADD_SPEED TrickerBuffType = 1 | |||
| TrickerBuffType_SPEAR TrickerBuffType = 2 | |||
| TrickerBuffType_ADD_AP TrickerBuffType = 3 | |||
| TrickerBuffType_CLAIRAUDIENCE TrickerBuffType = 4 | |||
| TrickerBuffType_TRICKER_INVISIBLE TrickerBuffType = 5 | |||
| ) | |||
| // Enum value maps for TrickerBuffType. | |||
| var ( | |||
| TrickerBuffType_name = map[int32]string{ | |||
| 0: "NULL_TBUFF_TYPE", | |||
| 1: "TRICKER_ADD_SPEED", | |||
| 2: "SPEAR", | |||
| 3: "ADD_AP", | |||
| 4: "CLAIRAUDIENCE", | |||
| 5: "TRICKER_INVISIBLE", | |||
| } | |||
| TrickerBuffType_value = map[string]int32{ | |||
| "NULL_TBUFF_TYPE": 0, | |||
| "TRICKER_ADD_SPEED": 1, | |||
| "SPEAR": 2, | |||
| "ADD_AP": 3, | |||
| "CLAIRAUDIENCE": 4, | |||
| "TRICKER_INVISIBLE": 5, | |||
| } | |||
| ) | |||
| func (x TrickerBuffType) Enum() *TrickerBuffType { | |||
| p := new(TrickerBuffType) | |||
| *p = x | |||
| return p | |||
| } | |||
| func (x TrickerBuffType) String() string { | |||
| return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | |||
| } | |||
| func (TrickerBuffType) Descriptor() protoreflect.EnumDescriptor { | |||
| return file_MessageType_proto_enumTypes[6].Descriptor() | |||
| } | |||
| func (TrickerBuffType) Type() protoreflect.EnumType { | |||
| return &file_MessageType_proto_enumTypes[6] | |||
| } | |||
| func (x TrickerBuffType) Number() protoreflect.EnumNumber { | |||
| return protoreflect.EnumNumber(x) | |||
| } | |||
| // Deprecated: Use TrickerBuffType.Descriptor instead. | |||
| func (TrickerBuffType) EnumDescriptor() ([]byte, []int) { | |||
| return file_MessageType_proto_rawDescGZIP(), []int{6} | |||
| } | |||
| type PlayerType int32 | |||
| const ( | |||
| PlayerType_NULL_PLAYER_TYPE PlayerType = 0 | |||
| PlayerType_STUDENT_PLAYER PlayerType = 1 | |||
| PlayerType_TRICKER_PLAYER PlayerType = 2 | |||
| ) | |||
| // Enum value maps for PlayerType. | |||
| var ( | |||
| PlayerType_name = map[int32]string{ | |||
| 0: "NULL_PLAYER_TYPE", | |||
| 1: "STUDENT_PLAYER", | |||
| 2: "TRICKER_PLAYER", | |||
| } | |||
| PlayerType_value = map[string]int32{ | |||
| "NULL_PLAYER_TYPE": 0, | |||
| "STUDENT_PLAYER": 1, | |||
| "TRICKER_PLAYER": 2, | |||
| } | |||
| ) | |||
| func (x PlayerType) Enum() *PlayerType { | |||
| p := new(PlayerType) | |||
| *p = x | |||
| return p | |||
| } | |||
| func (x PlayerType) String() string { | |||
| return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | |||
| } | |||
| func (PlayerType) Descriptor() protoreflect.EnumDescriptor { | |||
| return file_MessageType_proto_enumTypes[7].Descriptor() | |||
| } | |||
| func (PlayerType) Type() protoreflect.EnumType { | |||
| return &file_MessageType_proto_enumTypes[7] | |||
| } | |||
| func (x PlayerType) Number() protoreflect.EnumNumber { | |||
| return protoreflect.EnumNumber(x) | |||
| } | |||
| // Deprecated: Use PlayerType.Descriptor instead. | |||
| func (PlayerType) EnumDescriptor() ([]byte, []int) { | |||
| return file_MessageType_proto_rawDescGZIP(), []int{7} | |||
| } | |||
| type StudentType int32 | |||
| const ( | |||
| StudentType_NULL_STUDENT_TYPE StudentType = 0 | |||
| StudentType_ATHLETE StudentType = 1 | |||
| StudentType_TEACHER StudentType = 2 | |||
| StudentType_STRAIGHT_A_STUDENT StudentType = 3 | |||
| StudentType_ROBOT StudentType = 4 | |||
| StudentType_TECH_OTAKU StudentType = 5 | |||
| StudentType_SUNSHINE StudentType = 6 | |||
| ) | |||
| // Enum value maps for StudentType. | |||
| var ( | |||
| StudentType_name = map[int32]string{ | |||
| 0: "NULL_STUDENT_TYPE", | |||
| 1: "ATHLETE", | |||
| 2: "TEACHER", | |||
| 3: "STRAIGHT_A_STUDENT", | |||
| 4: "ROBOT", | |||
| 5: "TECH_OTAKU", | |||
| 6: "SUNSHINE", | |||
| } | |||
| StudentType_value = map[string]int32{ | |||
| "NULL_STUDENT_TYPE": 0, | |||
| "ATHLETE": 1, | |||
| "TEACHER": 2, | |||
| "STRAIGHT_A_STUDENT": 3, | |||
| "ROBOT": 4, | |||
| "TECH_OTAKU": 5, | |||
| "SUNSHINE": 6, | |||
| } | |||
| ) | |||
| func (x StudentType) Enum() *StudentType { | |||
| p := new(StudentType) | |||
| *p = x | |||
| return p | |||
| } | |||
| func (x StudentType) String() string { | |||
| return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | |||
| } | |||
| func (StudentType) Descriptor() protoreflect.EnumDescriptor { | |||
| return file_MessageType_proto_enumTypes[8].Descriptor() | |||
| } | |||
| func (StudentType) Type() protoreflect.EnumType { | |||
| return &file_MessageType_proto_enumTypes[8] | |||
| } | |||
| func (x StudentType) Number() protoreflect.EnumNumber { | |||
| return protoreflect.EnumNumber(x) | |||
| } | |||
| // Deprecated: Use StudentType.Descriptor instead. | |||
| func (StudentType) EnumDescriptor() ([]byte, []int) { | |||
| return file_MessageType_proto_rawDescGZIP(), []int{8} | |||
| } | |||
| type TrickerType int32 | |||
| const ( | |||
| TrickerType_NULL_TRICKER_TYPE TrickerType = 0 | |||
| TrickerType_ASSASSIN TrickerType = 1 | |||
| TrickerType_KLEE TrickerType = 2 | |||
| TrickerType_A_NOISY_PERSON TrickerType = 3 | |||
| TrickerType_IDOL TrickerType = 4 | |||
| ) | |||
| // Enum value maps for TrickerType. | |||
| var ( | |||
| TrickerType_name = map[int32]string{ | |||
| 0: "NULL_TRICKER_TYPE", | |||
| 1: "ASSASSIN", | |||
| 2: "KLEE", | |||
| 3: "A_NOISY_PERSON", | |||
| 4: "IDOL", | |||
| } | |||
| TrickerType_value = map[string]int32{ | |||
| "NULL_TRICKER_TYPE": 0, | |||
| "ASSASSIN": 1, | |||
| "KLEE": 2, | |||
| "A_NOISY_PERSON": 3, | |||
| "IDOL": 4, | |||
| } | |||
| ) | |||
| func (x TrickerType) Enum() *TrickerType { | |||
| p := new(TrickerType) | |||
| *p = x | |||
| return p | |||
| } | |||
| func (x TrickerType) String() string { | |||
| return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | |||
| } | |||
| func (TrickerType) Descriptor() protoreflect.EnumDescriptor { | |||
| return file_MessageType_proto_enumTypes[9].Descriptor() | |||
| } | |||
| func (TrickerType) Type() protoreflect.EnumType { | |||
| return &file_MessageType_proto_enumTypes[9] | |||
| } | |||
| func (x TrickerType) Number() protoreflect.EnumNumber { | |||
| return protoreflect.EnumNumber(x) | |||
| } | |||
| // Deprecated: Use TrickerType.Descriptor instead. | |||
| func (TrickerType) EnumDescriptor() ([]byte, []int) { | |||
| return file_MessageType_proto_rawDescGZIP(), []int{9} | |||
| } | |||
| // 游戏进行状态 | |||
| type GameState int32 | |||
| const ( | |||
| GameState_NULL_GAME_STATE GameState = 0 | |||
| GameState_GAME_START GameState = 1 | |||
| GameState_GAME_RUNNING GameState = 2 | |||
| GameState_GAME_END GameState = 3 | |||
| ) | |||
| // Enum value maps for GameState. | |||
| var ( | |||
| GameState_name = map[int32]string{ | |||
| 0: "NULL_GAME_STATE", | |||
| 1: "GAME_START", | |||
| 2: "GAME_RUNNING", | |||
| 3: "GAME_END", | |||
| } | |||
| GameState_value = map[string]int32{ | |||
| "NULL_GAME_STATE": 0, | |||
| "GAME_START": 1, | |||
| "GAME_RUNNING": 2, | |||
| "GAME_END": 3, | |||
| } | |||
| ) | |||
| func (x GameState) Enum() *GameState { | |||
| p := new(GameState) | |||
| *p = x | |||
| return p | |||
| } | |||
| func (x GameState) String() string { | |||
| return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | |||
| } | |||
| func (GameState) Descriptor() protoreflect.EnumDescriptor { | |||
| return file_MessageType_proto_enumTypes[10].Descriptor() | |||
| } | |||
| func (GameState) Type() protoreflect.EnumType { | |||
| return &file_MessageType_proto_enumTypes[10] | |||
| } | |||
| func (x GameState) Number() protoreflect.EnumNumber { | |||
| return protoreflect.EnumNumber(x) | |||
| } | |||
| // Deprecated: Use GameState.Descriptor instead. | |||
| func (GameState) EnumDescriptor() ([]byte, []int) { | |||
| return file_MessageType_proto_rawDescGZIP(), []int{10} | |||
| } | |||
| var File_MessageType_proto protoreflect.FileDescriptor | |||
| var file_MessageType_proto_rawDesc = []byte{ | |||
| 0x0a, 0x11, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, | |||
| 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2a, 0x82, 0x01, | |||
| 0x0a, 0x0a, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, | |||
| 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x42, 0x55, 0x4c, 0x4c, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, | |||
| 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x4c, 0x59, 0x49, 0x4e, 0x47, 0x5f, 0x4b, 0x4e, 0x49, | |||
| 0x46, 0x45, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x4f, 0x4d, 0x4d, 0x4f, 0x4e, 0x5f, 0x41, | |||
| 0x54, 0x54, 0x41, 0x43, 0x4b, 0x5f, 0x4f, 0x46, 0x5f, 0x54, 0x52, 0x49, 0x43, 0x4b, 0x45, 0x52, | |||
| 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x4f, 0x4d, 0x42, 0x5f, 0x42, 0x4f, 0x4d, 0x42, 0x10, | |||
| 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x4a, 0x55, 0x4d, 0x50, 0x59, 0x5f, 0x44, 0x55, 0x4d, 0x50, 0x54, | |||
| 0x59, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x54, 0x4f, 0x4d, 0x5f, 0x42, 0x4f, 0x4d, 0x42, | |||
| 0x10, 0x05, 0x2a, 0xa1, 0x01, 0x0a, 0x09, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, | |||
| 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x5f, 0x54, | |||
| 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x41, 0x4e, 0x44, 0x10, 0x01, 0x12, | |||
| 0x08, 0x0a, 0x04, 0x57, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x52, 0x41, | |||
| 0x53, 0x53, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4c, 0x41, 0x53, 0x53, 0x52, 0x4f, 0x4f, | |||
| 0x4d, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x47, 0x41, 0x54, 0x45, 0x10, 0x05, 0x12, 0x0f, 0x0a, | |||
| 0x0b, 0x48, 0x49, 0x44, 0x44, 0x45, 0x4e, 0x5f, 0x47, 0x41, 0x54, 0x45, 0x10, 0x06, 0x12, 0x0a, | |||
| 0x0a, 0x06, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x4f, | |||
| 0x4f, 0x52, 0x33, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x4f, 0x4f, 0x52, 0x35, 0x10, 0x09, | |||
| 0x12, 0x09, 0x0a, 0x05, 0x44, 0x4f, 0x4f, 0x52, 0x36, 0x10, 0x0a, 0x12, 0x09, 0x0a, 0x05, 0x43, | |||
| 0x48, 0x45, 0x53, 0x54, 0x10, 0x0b, 0x2a, 0x38, 0x0a, 0x09, 0x53, 0x68, 0x61, 0x70, 0x65, 0x54, | |||
| 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x53, 0x48, 0x41, 0x50, | |||
| 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x49, 0x52, 0x43, | |||
| 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x51, 0x55, 0x41, 0x52, 0x45, 0x10, 0x02, | |||
| 0x2a, 0xae, 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, | |||
| 0x0e, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, | |||
| 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x44, 0x44, 0x5f, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, 0x01, | |||
| 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x44, 0x44, 0x5f, 0x4c, 0x49, 0x46, 0x45, 0x5f, 0x4f, 0x52, 0x5f, | |||
| 0x43, 0x4c, 0x41, 0x49, 0x52, 0x41, 0x55, 0x44, 0x49, 0x45, 0x4e, 0x43, 0x45, 0x10, 0x02, 0x12, | |||
| 0x10, 0x0a, 0x0c, 0x41, 0x44, 0x44, 0x5f, 0x48, 0x50, 0x5f, 0x4f, 0x52, 0x5f, 0x41, 0x50, 0x10, | |||
| 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x48, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x4f, 0x52, 0x5f, 0x53, | |||
| 0x50, 0x45, 0x41, 0x52, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x4b, 0x45, 0x59, 0x33, 0x10, 0x05, | |||
| 0x12, 0x08, 0x0a, 0x04, 0x4b, 0x45, 0x59, 0x35, 0x10, 0x06, 0x12, 0x08, 0x0a, 0x04, 0x4b, 0x45, | |||
| 0x59, 0x36, 0x10, 0x07, 0x12, 0x1b, 0x0a, 0x17, 0x52, 0x45, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, | |||
| 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x44, 0x49, 0x5a, 0x5a, 0x49, 0x4e, 0x45, 0x53, 0x53, 0x10, | |||
| 0x08, 0x2a, 0x6e, 0x0a, 0x0f, 0x53, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x66, 0x66, | |||
| 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x53, 0x42, 0x55, | |||
| 0x46, 0x46, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x55, | |||
| 0x44, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x44, 0x44, 0x5f, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, 0x01, | |||
| 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x44, 0x44, 0x5f, 0x4c, 0x49, 0x46, 0x45, 0x10, 0x02, 0x12, 0x0a, | |||
| 0x0a, 0x06, 0x53, 0x48, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, | |||
| 0x55, 0x44, 0x45, 0x4e, 0x54, 0x5f, 0x49, 0x4e, 0x56, 0x49, 0x53, 0x49, 0x42, 0x4c, 0x45, 0x10, | |||
| 0x04, 0x2a, 0xa9, 0x02, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, | |||
| 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, | |||
| 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x44, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, | |||
| 0x4c, 0x45, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x44, | |||
| 0x44, 0x49, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x51, 0x55, 0x49, 0x54, | |||
| 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x52, 0x41, 0x44, 0x55, 0x41, 0x54, 0x45, 0x44, 0x10, | |||
| 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x0b, | |||
| 0x0a, 0x07, 0x52, 0x45, 0x53, 0x43, 0x55, 0x45, 0x44, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x53, | |||
| 0x54, 0x55, 0x4e, 0x4e, 0x45, 0x44, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x52, 0x45, 0x41, | |||
| 0x54, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x53, 0x43, 0x55, 0x49, | |||
| 0x4e, 0x47, 0x10, 0x0a, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x57, 0x49, 0x4e, 0x47, 0x49, 0x4e, 0x47, | |||
| 0x10, 0x0b, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x54, 0x54, 0x41, 0x43, 0x4b, 0x49, 0x4e, 0x47, 0x10, | |||
| 0x0c, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x43, 0x4b, 0x49, 0x4e, 0x47, 0x10, 0x0d, 0x12, 0x0d, | |||
| 0x0a, 0x09, 0x52, 0x55, 0x4d, 0x4d, 0x41, 0x47, 0x49, 0x4e, 0x47, 0x10, 0x0e, 0x12, 0x0c, 0x0a, | |||
| 0x08, 0x43, 0x4c, 0x49, 0x4d, 0x42, 0x49, 0x4e, 0x47, 0x10, 0x0f, 0x12, 0x13, 0x0a, 0x0f, 0x4f, | |||
| 0x50, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x5f, 0x43, 0x48, 0x45, 0x53, 0x54, 0x10, 0x10, | |||
| 0x12, 0x17, 0x0a, 0x13, 0x55, 0x53, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, | |||
| 0x4c, 0x5f, 0x53, 0x4b, 0x49, 0x4c, 0x4c, 0x10, 0x11, 0x12, 0x12, 0x0a, 0x0e, 0x4f, 0x50, 0x45, | |||
| 0x4e, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x5f, 0x47, 0x41, 0x54, 0x45, 0x10, 0x12, 0x2a, 0x7e, 0x0a, | |||
| 0x0f, 0x54, 0x72, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x42, 0x75, 0x66, 0x66, 0x54, 0x79, 0x70, 0x65, | |||
| 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x54, 0x42, 0x55, 0x46, 0x46, 0x5f, 0x54, | |||
| 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x52, 0x49, 0x43, 0x4b, 0x45, 0x52, | |||
| 0x5f, 0x41, 0x44, 0x44, 0x5f, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, | |||
| 0x53, 0x50, 0x45, 0x41, 0x52, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x44, 0x44, 0x5f, 0x41, | |||
| 0x50, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x4c, 0x41, 0x49, 0x52, 0x41, 0x55, 0x44, 0x49, | |||
| 0x45, 0x4e, 0x43, 0x45, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x52, 0x49, 0x43, 0x4b, 0x45, | |||
| 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x49, 0x53, 0x49, 0x42, 0x4c, 0x45, 0x10, 0x05, 0x2a, 0x4a, 0x0a, | |||
| 0x0a, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x4e, | |||
| 0x55, 0x4c, 0x4c, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, | |||
| 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x55, 0x44, 0x45, 0x4e, 0x54, 0x5f, 0x50, 0x4c, 0x41, | |||
| 0x59, 0x45, 0x52, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x52, 0x49, 0x43, 0x4b, 0x45, 0x52, | |||
| 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x10, 0x02, 0x2a, 0x7f, 0x0a, 0x0b, 0x53, 0x74, 0x75, | |||
| 0x64, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x55, 0x4c, 0x4c, | |||
| 0x5f, 0x53, 0x54, 0x55, 0x44, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, | |||
| 0x0b, 0x0a, 0x07, 0x41, 0x54, 0x48, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, | |||
| 0x54, 0x45, 0x41, 0x43, 0x48, 0x45, 0x52, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x52, | |||
| 0x41, 0x49, 0x47, 0x48, 0x54, 0x5f, 0x41, 0x5f, 0x53, 0x54, 0x55, 0x44, 0x45, 0x4e, 0x54, 0x10, | |||
| 0x03, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x4f, 0x42, 0x4f, 0x54, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, | |||
| 0x54, 0x45, 0x43, 0x48, 0x5f, 0x4f, 0x54, 0x41, 0x4b, 0x55, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, | |||
| 0x53, 0x55, 0x4e, 0x53, 0x48, 0x49, 0x4e, 0x45, 0x10, 0x06, 0x2a, 0x5a, 0x0a, 0x0b, 0x54, 0x72, | |||
| 0x69, 0x63, 0x6b, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x55, 0x4c, | |||
| 0x4c, 0x5f, 0x54, 0x52, 0x49, 0x43, 0x4b, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, | |||
| 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x53, 0x53, 0x41, 0x53, 0x53, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x08, | |||
| 0x0a, 0x04, 0x4b, 0x4c, 0x45, 0x45, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x5f, 0x4e, 0x4f, | |||
| 0x49, 0x53, 0x59, 0x5f, 0x50, 0x45, 0x52, 0x53, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, | |||
| 0x49, 0x44, 0x4f, 0x4c, 0x10, 0x04, 0x2a, 0x50, 0x0a, 0x09, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, | |||
| 0x61, 0x74, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x47, 0x41, 0x4d, 0x45, | |||
| 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x41, 0x4d, 0x45, | |||
| 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x47, 0x41, 0x4d, 0x45, | |||
| 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x47, 0x41, | |||
| 0x4d, 0x45, 0x5f, 0x45, 0x4e, 0x44, 0x10, 0x03, 0x42, 0x6f, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, | |||
| 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x10, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, | |||
| 0x65, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x0d, 0x6a, 0x6f, | |||
| 0x62, 0x2d, 0x41, 0x50, 0x49, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0xa2, 0x02, 0x03, 0x50, 0x58, | |||
| 0x58, 0xaa, 0x02, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0xca, 0x02, 0x08, 0x50, | |||
| 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0xe2, 0x02, 0x14, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, | |||
| 0x75, 0x66, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, | |||
| 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, | |||
| 0x33, | |||
| } | |||
| var ( | |||
| file_MessageType_proto_rawDescOnce sync.Once | |||
| file_MessageType_proto_rawDescData = file_MessageType_proto_rawDesc | |||
| ) | |||
| func file_MessageType_proto_rawDescGZIP() []byte { | |||
| file_MessageType_proto_rawDescOnce.Do(func() { | |||
| file_MessageType_proto_rawDescData = protoimpl.X.CompressGZIP(file_MessageType_proto_rawDescData) | |||
| }) | |||
| return file_MessageType_proto_rawDescData | |||
| } | |||
| var file_MessageType_proto_enumTypes = make([]protoimpl.EnumInfo, 11) | |||
| var file_MessageType_proto_goTypes = []interface{}{ | |||
| (BulletType)(0), // 0: protobuf.BulletType | |||
| (PlaceType)(0), // 1: protobuf.PlaceType | |||
| (ShapeType)(0), // 2: protobuf.ShapeType | |||
| (PropType)(0), // 3: protobuf.PropType | |||
| (StudentBuffType)(0), // 4: protobuf.StudentBuffType | |||
| (PlayerState)(0), // 5: protobuf.PlayerState | |||
| (TrickerBuffType)(0), // 6: protobuf.TrickerBuffType | |||
| (PlayerType)(0), // 7: protobuf.PlayerType | |||
| (StudentType)(0), // 8: protobuf.StudentType | |||
| (TrickerType)(0), // 9: protobuf.TrickerType | |||
| (GameState)(0), // 10: protobuf.GameState | |||
| } | |||
| var file_MessageType_proto_depIdxs = []int32{ | |||
| 0, // [0:0] is the sub-list for method output_type | |||
| 0, // [0:0] is the sub-list for method input_type | |||
| 0, // [0:0] is the sub-list for extension type_name | |||
| 0, // [0:0] is the sub-list for extension extendee | |||
| 0, // [0:0] is the sub-list for field type_name | |||
| } | |||
| func init() { file_MessageType_proto_init() } | |||
| func file_MessageType_proto_init() { | |||
| if File_MessageType_proto != nil { | |||
| return | |||
| } | |||
| type x struct{} | |||
| out := protoimpl.TypeBuilder{ | |||
| File: protoimpl.DescBuilder{ | |||
| GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | |||
| RawDescriptor: file_MessageType_proto_rawDesc, | |||
| NumEnums: 11, | |||
| NumMessages: 0, | |||
| NumExtensions: 0, | |||
| NumServices: 0, | |||
| }, | |||
| GoTypes: file_MessageType_proto_goTypes, | |||
| DependencyIndexes: file_MessageType_proto_depIdxs, | |||
| EnumInfos: file_MessageType_proto_enumTypes, | |||
| }.Build() | |||
| File_MessageType_proto = out.File | |||
| file_MessageType_proto_rawDesc = nil | |||
| file_MessageType_proto_goTypes = nil | |||
| file_MessageType_proto_depIdxs = nil | |||
| } | |||
| @@ -0,0 +1,186 @@ | |||
| // Code generated by protoc-gen-go. DO NOT EDIT. | |||
| // versions: | |||
| // protoc-gen-go v1.28.0 | |||
| // protoc (unknown) | |||
| // source: Services.proto | |||
| package proto | |||
| import ( | |||
| protoreflect "google.golang.org/protobuf/reflect/protoreflect" | |||
| protoimpl "google.golang.org/protobuf/runtime/protoimpl" | |||
| reflect "reflect" | |||
| ) | |||
| const ( | |||
| // Verify that this generated code is sufficiently up-to-date. | |||
| _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) | |||
| // Verify that runtime/protoimpl is sufficiently up-to-date. | |||
| _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) | |||
| ) | |||
| var File_Services_proto protoreflect.FileDescriptor | |||
| var file_Services_proto_rawDesc = []byte{ | |||
| 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, | |||
| 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x1a, 0x15, 0x4d, 0x65, 0x73, 0x73, | |||
| 0x61, 0x67, 0x65, 0x32, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, | |||
| 0x6f, 0x1a, 0x14, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x53, 0x65, 0x72, 0x76, 0x65, | |||
| 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x80, 0x08, 0x0a, 0x10, 0x41, 0x76, 0x61, 0x69, | |||
| 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x0d, | |||
| 0x54, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x2e, | |||
| 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x44, 0x4d, 0x73, 0x67, 0x1a, 0x11, | |||
| 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, | |||
| 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x13, | |||
| 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, | |||
| 0x4d, 0x73, 0x67, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, | |||
| 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x30, 0x01, | |||
| 0x12, 0x2c, 0x0a, 0x04, 0x4d, 0x6f, 0x76, 0x65, 0x12, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, | |||
| 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x4d, 0x73, 0x67, 0x1a, 0x11, 0x2e, 0x70, 0x72, | |||
| 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x12, 0x30, | |||
| 0x0a, 0x08, 0x50, 0x69, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x12, 0x11, 0x2e, 0x70, 0x72, 0x6f, | |||
| 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x4d, 0x73, 0x67, 0x1a, 0x11, 0x2e, | |||
| 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, | |||
| 0x12, 0x2f, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x12, 0x11, 0x2e, 0x70, 0x72, | |||
| 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x4d, 0x73, 0x67, 0x1a, 0x11, | |||
| 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, | |||
| 0x73, 0x12, 0x31, 0x0a, 0x09, 0x54, 0x68, 0x72, 0x6f, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x12, 0x11, | |||
| 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x4d, 0x73, | |||
| 0x67, 0x1a, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, | |||
| 0x6c, 0x52, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, | |||
| 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6b, 0x69, 0x6c, | |||
| 0x6c, 0x4d, 0x73, 0x67, 0x1a, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, | |||
| 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4d, | |||
| 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, | |||
| 0x66, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x1a, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, | |||
| 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x0d, | |||
| 0x53, 0x74, 0x61, 0x72, 0x74, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x0f, 0x2e, | |||
| 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x44, 0x4d, 0x73, 0x67, 0x1a, 0x11, | |||
| 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, | |||
| 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x63, 0x75, 0x65, | |||
| 0x4d, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, | |||
| 0x54, 0x72, 0x65, 0x61, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x63, 0x75, 0x65, 0x4d, 0x73, | |||
| 0x67, 0x1a, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, | |||
| 0x6c, 0x52, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x72, 0x65, | |||
| 0x61, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, | |||
| 0x66, 0x2e, 0x54, 0x72, 0x65, 0x61, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x63, 0x75, 0x65, | |||
| 0x4d, 0x73, 0x67, 0x1a, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, | |||
| 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, | |||
| 0x12, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x74, 0x74, 0x61, | |||
| 0x63, 0x6b, 0x4d, 0x73, 0x67, 0x1a, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, | |||
| 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x08, 0x47, 0x72, 0x61, 0x64, | |||
| 0x75, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, | |||
| 0x49, 0x44, 0x4d, 0x73, 0x67, 0x1a, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, | |||
| 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x08, 0x4f, 0x70, 0x65, 0x6e, | |||
| 0x44, 0x6f, 0x6f, 0x72, 0x12, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, | |||
| 0x49, 0x44, 0x4d, 0x73, 0x67, 0x1a, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, | |||
| 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x09, 0x43, 0x6c, 0x6f, 0x73, | |||
| 0x65, 0x44, 0x6f, 0x6f, 0x72, 0x12, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, | |||
| 0x2e, 0x49, 0x44, 0x4d, 0x73, 0x67, 0x1a, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, | |||
| 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x0a, 0x53, 0x6b, 0x69, | |||
| 0x70, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, | |||
| 0x75, 0x66, 0x2e, 0x49, 0x44, 0x4d, 0x73, 0x67, 0x1a, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, | |||
| 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x0d, 0x53, | |||
| 0x74, 0x61, 0x72, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x47, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x2e, 0x70, | |||
| 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x44, 0x4d, 0x73, 0x67, 0x1a, 0x11, 0x2e, | |||
| 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, | |||
| 0x12, 0x34, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x68, 0x65, | |||
| 0x73, 0x74, 0x12, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x44, | |||
| 0x4d, 0x73, 0x67, 0x1a, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, | |||
| 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x0c, 0x45, 0x6e, 0x64, 0x41, 0x6c, 0x6c, | |||
| 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, | |||
| 0x66, 0x2e, 0x49, 0x44, 0x4d, 0x73, 0x67, 0x1a, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, | |||
| 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x42, 0x6c, 0x0a, 0x0c, 0x63, 0x6f, | |||
| 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x0d, 0x53, 0x65, 0x72, 0x76, | |||
| 0x69, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x0d, 0x6a, 0x6f, 0x62, | |||
| 0x2d, 0x41, 0x50, 0x49, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, | |||
| 0xaa, 0x02, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0xca, 0x02, 0x08, 0x50, 0x72, | |||
| 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0xe2, 0x02, 0x14, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, | |||
| 0x66, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, | |||
| 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | |||
| } | |||
| var file_Services_proto_goTypes = []interface{}{ | |||
| (*IDMsg)(nil), // 0: protobuf.IDMsg | |||
| (*PlayerMsg)(nil), // 1: protobuf.PlayerMsg | |||
| (*MoveMsg)(nil), // 2: protobuf.MoveMsg | |||
| (*PropMsg)(nil), // 3: protobuf.PropMsg | |||
| (*SkillMsg)(nil), // 4: protobuf.SkillMsg | |||
| (*SendMsg)(nil), // 5: protobuf.SendMsg | |||
| (*TreatAndRescueMsg)(nil), // 6: protobuf.TreatAndRescueMsg | |||
| (*AttackMsg)(nil), // 7: protobuf.AttackMsg | |||
| (*BoolRes)(nil), // 8: protobuf.BoolRes | |||
| (*MessageToClient)(nil), // 9: protobuf.MessageToClient | |||
| (*MoveRes)(nil), // 10: protobuf.MoveRes | |||
| } | |||
| var file_Services_proto_depIdxs = []int32{ | |||
| 0, // 0: protobuf.AvailableService.TryConnection:input_type -> protobuf.IDMsg | |||
| 1, // 1: protobuf.AvailableService.AddPlayer:input_type -> protobuf.PlayerMsg | |||
| 2, // 2: protobuf.AvailableService.Move:input_type -> protobuf.MoveMsg | |||
| 3, // 3: protobuf.AvailableService.PickProp:input_type -> protobuf.PropMsg | |||
| 3, // 4: protobuf.AvailableService.UseProp:input_type -> protobuf.PropMsg | |||
| 3, // 5: protobuf.AvailableService.ThrowProp:input_type -> protobuf.PropMsg | |||
| 4, // 6: protobuf.AvailableService.UseSkill:input_type -> protobuf.SkillMsg | |||
| 5, // 7: protobuf.AvailableService.SendMessage:input_type -> protobuf.SendMsg | |||
| 0, // 8: protobuf.AvailableService.StartLearning:input_type -> protobuf.IDMsg | |||
| 6, // 9: protobuf.AvailableService.StartRescueMate:input_type -> protobuf.TreatAndRescueMsg | |||
| 6, // 10: protobuf.AvailableService.StartTreatMate:input_type -> protobuf.TreatAndRescueMsg | |||
| 7, // 11: protobuf.AvailableService.Attack:input_type -> protobuf.AttackMsg | |||
| 0, // 12: protobuf.AvailableService.Graduate:input_type -> protobuf.IDMsg | |||
| 0, // 13: protobuf.AvailableService.OpenDoor:input_type -> protobuf.IDMsg | |||
| 0, // 14: protobuf.AvailableService.CloseDoor:input_type -> protobuf.IDMsg | |||
| 0, // 15: protobuf.AvailableService.SkipWindow:input_type -> protobuf.IDMsg | |||
| 0, // 16: protobuf.AvailableService.StartOpenGate:input_type -> protobuf.IDMsg | |||
| 0, // 17: protobuf.AvailableService.StartOpenChest:input_type -> protobuf.IDMsg | |||
| 0, // 18: protobuf.AvailableService.EndAllAction:input_type -> protobuf.IDMsg | |||
| 8, // 19: protobuf.AvailableService.TryConnection:output_type -> protobuf.BoolRes | |||
| 9, // 20: protobuf.AvailableService.AddPlayer:output_type -> protobuf.MessageToClient | |||
| 10, // 21: protobuf.AvailableService.Move:output_type -> protobuf.MoveRes | |||
| 8, // 22: protobuf.AvailableService.PickProp:output_type -> protobuf.BoolRes | |||
| 8, // 23: protobuf.AvailableService.UseProp:output_type -> protobuf.BoolRes | |||
| 8, // 24: protobuf.AvailableService.ThrowProp:output_type -> protobuf.BoolRes | |||
| 8, // 25: protobuf.AvailableService.UseSkill:output_type -> protobuf.BoolRes | |||
| 8, // 26: protobuf.AvailableService.SendMessage:output_type -> protobuf.BoolRes | |||
| 8, // 27: protobuf.AvailableService.StartLearning:output_type -> protobuf.BoolRes | |||
| 8, // 28: protobuf.AvailableService.StartRescueMate:output_type -> protobuf.BoolRes | |||
| 8, // 29: protobuf.AvailableService.StartTreatMate:output_type -> protobuf.BoolRes | |||
| 8, // 30: protobuf.AvailableService.Attack:output_type -> protobuf.BoolRes | |||
| 8, // 31: protobuf.AvailableService.Graduate:output_type -> protobuf.BoolRes | |||
| 8, // 32: protobuf.AvailableService.OpenDoor:output_type -> protobuf.BoolRes | |||
| 8, // 33: protobuf.AvailableService.CloseDoor:output_type -> protobuf.BoolRes | |||
| 8, // 34: protobuf.AvailableService.SkipWindow:output_type -> protobuf.BoolRes | |||
| 8, // 35: protobuf.AvailableService.StartOpenGate:output_type -> protobuf.BoolRes | |||
| 8, // 36: protobuf.AvailableService.StartOpenChest:output_type -> protobuf.BoolRes | |||
| 8, // 37: protobuf.AvailableService.EndAllAction:output_type -> protobuf.BoolRes | |||
| 19, // [19:38] is the sub-list for method output_type | |||
| 0, // [0:19] is the sub-list for method input_type | |||
| 0, // [0:0] is the sub-list for extension type_name | |||
| 0, // [0:0] is the sub-list for extension extendee | |||
| 0, // [0:0] is the sub-list for field type_name | |||
| } | |||
| func init() { file_Services_proto_init() } | |||
| func file_Services_proto_init() { | |||
| if File_Services_proto != nil { | |||
| return | |||
| } | |||
| file_Message2Clients_proto_init() | |||
| file_Message2Server_proto_init() | |||
| type x struct{} | |||
| out := protoimpl.TypeBuilder{ | |||
| File: protoimpl.DescBuilder{ | |||
| GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | |||
| RawDescriptor: file_Services_proto_rawDesc, | |||
| NumEnums: 0, | |||
| NumMessages: 0, | |||
| NumExtensions: 0, | |||
| NumServices: 1, | |||
| }, | |||
| GoTypes: file_Services_proto_goTypes, | |||
| DependencyIndexes: file_Services_proto_depIdxs, | |||
| }.Build() | |||
| File_Services_proto = out.File | |||
| file_Services_proto_rawDesc = nil | |||
| file_Services_proto_goTypes = nil | |||
| file_Services_proto_depIdxs = nil | |||
| } | |||
| @@ -0,0 +1,785 @@ | |||
| // Code generated by protoc-gen-go-grpc. DO NOT EDIT. | |||
| // versions: | |||
| // - protoc-gen-go-grpc v1.2.0 | |||
| // - protoc (unknown) | |||
| // source: Services.proto | |||
| package proto | |||
| import ( | |||
| context "context" | |||
| grpc "google.golang.org/grpc" | |||
| codes "google.golang.org/grpc/codes" | |||
| status "google.golang.org/grpc/status" | |||
| ) | |||
| // This is a compile-time assertion to ensure that this generated file | |||
| // is compatible with the grpc package it is being compiled against. | |||
| // Requires gRPC-Go v1.32.0 or later. | |||
| const _ = grpc.SupportPackageIsVersion7 | |||
| // AvailableServiceClient is the client API for AvailableService service. | |||
| // | |||
| // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. | |||
| type AvailableServiceClient interface { | |||
| TryConnection(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) | |||
| // 游戏开局调用一次的服务 | |||
| AddPlayer(ctx context.Context, in *PlayerMsg, opts ...grpc.CallOption) (AvailableService_AddPlayerClient, error) | |||
| // 游戏过程中玩家执行操作的服务 | |||
| Move(ctx context.Context, in *MoveMsg, opts ...grpc.CallOption) (*MoveRes, error) | |||
| PickProp(ctx context.Context, in *PropMsg, opts ...grpc.CallOption) (*BoolRes, error) | |||
| UseProp(ctx context.Context, in *PropMsg, opts ...grpc.CallOption) (*BoolRes, error) | |||
| ThrowProp(ctx context.Context, in *PropMsg, opts ...grpc.CallOption) (*BoolRes, error) | |||
| UseSkill(ctx context.Context, in *SkillMsg, opts ...grpc.CallOption) (*BoolRes, error) | |||
| SendMessage(ctx context.Context, in *SendMsg, opts ...grpc.CallOption) (*BoolRes, error) | |||
| // rpc GetMessage (IDMsg) returns (stream MsgRes); | |||
| StartLearning(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) | |||
| StartRescueMate(ctx context.Context, in *TreatAndRescueMsg, opts ...grpc.CallOption) (*BoolRes, error) | |||
| StartTreatMate(ctx context.Context, in *TreatAndRescueMsg, opts ...grpc.CallOption) (*BoolRes, error) | |||
| Attack(ctx context.Context, in *AttackMsg, opts ...grpc.CallOption) (*BoolRes, error) | |||
| Graduate(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) | |||
| OpenDoor(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) | |||
| CloseDoor(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) | |||
| SkipWindow(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) | |||
| StartOpenGate(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) | |||
| StartOpenChest(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) | |||
| EndAllAction(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) | |||
| } | |||
| type availableServiceClient struct { | |||
| cc grpc.ClientConnInterface | |||
| } | |||
| func NewAvailableServiceClient(cc grpc.ClientConnInterface) AvailableServiceClient { | |||
| return &availableServiceClient{cc} | |||
| } | |||
| func (c *availableServiceClient) TryConnection(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) { | |||
| out := new(BoolRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/TryConnection", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| func (c *availableServiceClient) AddPlayer(ctx context.Context, in *PlayerMsg, opts ...grpc.CallOption) (AvailableService_AddPlayerClient, error) { | |||
| stream, err := c.cc.NewStream(ctx, &AvailableService_ServiceDesc.Streams[0], "/protobuf.AvailableService/AddPlayer", opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| x := &availableServiceAddPlayerClient{stream} | |||
| if err := x.ClientStream.SendMsg(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if err := x.ClientStream.CloseSend(); err != nil { | |||
| return nil, err | |||
| } | |||
| return x, nil | |||
| } | |||
| type AvailableService_AddPlayerClient interface { | |||
| Recv() (*MessageToClient, error) | |||
| grpc.ClientStream | |||
| } | |||
| type availableServiceAddPlayerClient struct { | |||
| grpc.ClientStream | |||
| } | |||
| func (x *availableServiceAddPlayerClient) Recv() (*MessageToClient, error) { | |||
| m := new(MessageToClient) | |||
| if err := x.ClientStream.RecvMsg(m); err != nil { | |||
| return nil, err | |||
| } | |||
| return m, nil | |||
| } | |||
| func (c *availableServiceClient) Move(ctx context.Context, in *MoveMsg, opts ...grpc.CallOption) (*MoveRes, error) { | |||
| out := new(MoveRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/Move", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| func (c *availableServiceClient) PickProp(ctx context.Context, in *PropMsg, opts ...grpc.CallOption) (*BoolRes, error) { | |||
| out := new(BoolRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/PickProp", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| func (c *availableServiceClient) UseProp(ctx context.Context, in *PropMsg, opts ...grpc.CallOption) (*BoolRes, error) { | |||
| out := new(BoolRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/UseProp", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| func (c *availableServiceClient) ThrowProp(ctx context.Context, in *PropMsg, opts ...grpc.CallOption) (*BoolRes, error) { | |||
| out := new(BoolRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/ThrowProp", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| func (c *availableServiceClient) UseSkill(ctx context.Context, in *SkillMsg, opts ...grpc.CallOption) (*BoolRes, error) { | |||
| out := new(BoolRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/UseSkill", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| func (c *availableServiceClient) SendMessage(ctx context.Context, in *SendMsg, opts ...grpc.CallOption) (*BoolRes, error) { | |||
| out := new(BoolRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/SendMessage", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| func (c *availableServiceClient) StartLearning(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) { | |||
| out := new(BoolRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/StartLearning", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| func (c *availableServiceClient) StartRescueMate(ctx context.Context, in *TreatAndRescueMsg, opts ...grpc.CallOption) (*BoolRes, error) { | |||
| out := new(BoolRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/StartRescueMate", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| func (c *availableServiceClient) StartTreatMate(ctx context.Context, in *TreatAndRescueMsg, opts ...grpc.CallOption) (*BoolRes, error) { | |||
| out := new(BoolRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/StartTreatMate", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| func (c *availableServiceClient) Attack(ctx context.Context, in *AttackMsg, opts ...grpc.CallOption) (*BoolRes, error) { | |||
| out := new(BoolRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/Attack", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| func (c *availableServiceClient) Graduate(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) { | |||
| out := new(BoolRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/Graduate", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| func (c *availableServiceClient) OpenDoor(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) { | |||
| out := new(BoolRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/OpenDoor", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| func (c *availableServiceClient) CloseDoor(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) { | |||
| out := new(BoolRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/CloseDoor", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| func (c *availableServiceClient) SkipWindow(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) { | |||
| out := new(BoolRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/SkipWindow", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| func (c *availableServiceClient) StartOpenGate(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) { | |||
| out := new(BoolRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/StartOpenGate", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| func (c *availableServiceClient) StartOpenChest(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) { | |||
| out := new(BoolRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/StartOpenChest", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| func (c *availableServiceClient) EndAllAction(ctx context.Context, in *IDMsg, opts ...grpc.CallOption) (*BoolRes, error) { | |||
| out := new(BoolRes) | |||
| err := c.cc.Invoke(ctx, "/protobuf.AvailableService/EndAllAction", in, out, opts...) | |||
| if err != nil { | |||
| return nil, err | |||
| } | |||
| return out, nil | |||
| } | |||
| // AvailableServiceServer is the server API for AvailableService service. | |||
| // All implementations should embed UnimplementedAvailableServiceServer | |||
| // for forward compatibility | |||
| type AvailableServiceServer interface { | |||
| TryConnection(context.Context, *IDMsg) (*BoolRes, error) | |||
| // 游戏开局调用一次的服务 | |||
| AddPlayer(*PlayerMsg, AvailableService_AddPlayerServer) error | |||
| // 游戏过程中玩家执行操作的服务 | |||
| Move(context.Context, *MoveMsg) (*MoveRes, error) | |||
| PickProp(context.Context, *PropMsg) (*BoolRes, error) | |||
| UseProp(context.Context, *PropMsg) (*BoolRes, error) | |||
| ThrowProp(context.Context, *PropMsg) (*BoolRes, error) | |||
| UseSkill(context.Context, *SkillMsg) (*BoolRes, error) | |||
| SendMessage(context.Context, *SendMsg) (*BoolRes, error) | |||
| // rpc GetMessage (IDMsg) returns (stream MsgRes); | |||
| StartLearning(context.Context, *IDMsg) (*BoolRes, error) | |||
| StartRescueMate(context.Context, *TreatAndRescueMsg) (*BoolRes, error) | |||
| StartTreatMate(context.Context, *TreatAndRescueMsg) (*BoolRes, error) | |||
| Attack(context.Context, *AttackMsg) (*BoolRes, error) | |||
| Graduate(context.Context, *IDMsg) (*BoolRes, error) | |||
| OpenDoor(context.Context, *IDMsg) (*BoolRes, error) | |||
| CloseDoor(context.Context, *IDMsg) (*BoolRes, error) | |||
| SkipWindow(context.Context, *IDMsg) (*BoolRes, error) | |||
| StartOpenGate(context.Context, *IDMsg) (*BoolRes, error) | |||
| StartOpenChest(context.Context, *IDMsg) (*BoolRes, error) | |||
| EndAllAction(context.Context, *IDMsg) (*BoolRes, error) | |||
| } | |||
| // UnimplementedAvailableServiceServer should be embedded to have forward compatible implementations. | |||
| type UnimplementedAvailableServiceServer struct { | |||
| } | |||
| func (UnimplementedAvailableServiceServer) TryConnection(context.Context, *IDMsg) (*BoolRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method TryConnection not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) AddPlayer(*PlayerMsg, AvailableService_AddPlayerServer) error { | |||
| return status.Errorf(codes.Unimplemented, "method AddPlayer not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) Move(context.Context, *MoveMsg) (*MoveRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method Move not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) PickProp(context.Context, *PropMsg) (*BoolRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method PickProp not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) UseProp(context.Context, *PropMsg) (*BoolRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method UseProp not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) ThrowProp(context.Context, *PropMsg) (*BoolRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method ThrowProp not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) UseSkill(context.Context, *SkillMsg) (*BoolRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method UseSkill not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) SendMessage(context.Context, *SendMsg) (*BoolRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method SendMessage not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) StartLearning(context.Context, *IDMsg) (*BoolRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method StartLearning not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) StartRescueMate(context.Context, *TreatAndRescueMsg) (*BoolRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method StartRescueMate not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) StartTreatMate(context.Context, *TreatAndRescueMsg) (*BoolRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method StartTreatMate not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) Attack(context.Context, *AttackMsg) (*BoolRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method Attack not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) Graduate(context.Context, *IDMsg) (*BoolRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method Graduate not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) OpenDoor(context.Context, *IDMsg) (*BoolRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method OpenDoor not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) CloseDoor(context.Context, *IDMsg) (*BoolRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method CloseDoor not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) SkipWindow(context.Context, *IDMsg) (*BoolRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method SkipWindow not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) StartOpenGate(context.Context, *IDMsg) (*BoolRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method StartOpenGate not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) StartOpenChest(context.Context, *IDMsg) (*BoolRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method StartOpenChest not implemented") | |||
| } | |||
| func (UnimplementedAvailableServiceServer) EndAllAction(context.Context, *IDMsg) (*BoolRes, error) { | |||
| return nil, status.Errorf(codes.Unimplemented, "method EndAllAction not implemented") | |||
| } | |||
| // UnsafeAvailableServiceServer may be embedded to opt out of forward compatibility for this service. | |||
| // Use of this interface is not recommended, as added methods to AvailableServiceServer will | |||
| // result in compilation errors. | |||
| type UnsafeAvailableServiceServer interface { | |||
| mustEmbedUnimplementedAvailableServiceServer() | |||
| } | |||
| func RegisterAvailableServiceServer(s grpc.ServiceRegistrar, srv AvailableServiceServer) { | |||
| s.RegisterService(&AvailableService_ServiceDesc, srv) | |||
| } | |||
| func _AvailableService_TryConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(IDMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).TryConnection(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/TryConnection", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).TryConnection(ctx, req.(*IDMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| func _AvailableService_AddPlayer_Handler(srv interface{}, stream grpc.ServerStream) error { | |||
| m := new(PlayerMsg) | |||
| if err := stream.RecvMsg(m); err != nil { | |||
| return err | |||
| } | |||
| return srv.(AvailableServiceServer).AddPlayer(m, &availableServiceAddPlayerServer{stream}) | |||
| } | |||
| type AvailableService_AddPlayerServer interface { | |||
| Send(*MessageToClient) error | |||
| grpc.ServerStream | |||
| } | |||
| type availableServiceAddPlayerServer struct { | |||
| grpc.ServerStream | |||
| } | |||
| func (x *availableServiceAddPlayerServer) Send(m *MessageToClient) error { | |||
| return x.ServerStream.SendMsg(m) | |||
| } | |||
| func _AvailableService_Move_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(MoveMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).Move(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/Move", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).Move(ctx, req.(*MoveMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| func _AvailableService_PickProp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(PropMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).PickProp(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/PickProp", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).PickProp(ctx, req.(*PropMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| func _AvailableService_UseProp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(PropMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).UseProp(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/UseProp", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).UseProp(ctx, req.(*PropMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| func _AvailableService_ThrowProp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(PropMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).ThrowProp(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/ThrowProp", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).ThrowProp(ctx, req.(*PropMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| func _AvailableService_UseSkill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(SkillMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).UseSkill(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/UseSkill", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).UseSkill(ctx, req.(*SkillMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| func _AvailableService_SendMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(SendMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).SendMessage(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/SendMessage", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).SendMessage(ctx, req.(*SendMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| func _AvailableService_StartLearning_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(IDMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).StartLearning(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/StartLearning", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).StartLearning(ctx, req.(*IDMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| func _AvailableService_StartRescueMate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(TreatAndRescueMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).StartRescueMate(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/StartRescueMate", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).StartRescueMate(ctx, req.(*TreatAndRescueMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| func _AvailableService_StartTreatMate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(TreatAndRescueMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).StartTreatMate(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/StartTreatMate", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).StartTreatMate(ctx, req.(*TreatAndRescueMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| func _AvailableService_Attack_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(AttackMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).Attack(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/Attack", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).Attack(ctx, req.(*AttackMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| func _AvailableService_Graduate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(IDMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).Graduate(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/Graduate", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).Graduate(ctx, req.(*IDMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| func _AvailableService_OpenDoor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(IDMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).OpenDoor(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/OpenDoor", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).OpenDoor(ctx, req.(*IDMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| func _AvailableService_CloseDoor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(IDMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).CloseDoor(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/CloseDoor", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).CloseDoor(ctx, req.(*IDMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| func _AvailableService_SkipWindow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(IDMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).SkipWindow(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/SkipWindow", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).SkipWindow(ctx, req.(*IDMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| func _AvailableService_StartOpenGate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(IDMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).StartOpenGate(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/StartOpenGate", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).StartOpenGate(ctx, req.(*IDMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| func _AvailableService_StartOpenChest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(IDMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).StartOpenChest(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/StartOpenChest", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).StartOpenChest(ctx, req.(*IDMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| func _AvailableService_EndAllAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||
| in := new(IDMsg) | |||
| if err := dec(in); err != nil { | |||
| return nil, err | |||
| } | |||
| if interceptor == nil { | |||
| return srv.(AvailableServiceServer).EndAllAction(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/protobuf.AvailableService/EndAllAction", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(AvailableServiceServer).EndAllAction(ctx, req.(*IDMsg)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| // AvailableService_ServiceDesc is the grpc.ServiceDesc for AvailableService service. | |||
| // It's only intended for direct use with grpc.RegisterService, | |||
| // and not to be introspected or modified (even as a copy) | |||
| var AvailableService_ServiceDesc = grpc.ServiceDesc{ | |||
| ServiceName: "protobuf.AvailableService", | |||
| HandlerType: (*AvailableServiceServer)(nil), | |||
| Methods: []grpc.MethodDesc{ | |||
| { | |||
| MethodName: "TryConnection", | |||
| Handler: _AvailableService_TryConnection_Handler, | |||
| }, | |||
| { | |||
| MethodName: "Move", | |||
| Handler: _AvailableService_Move_Handler, | |||
| }, | |||
| { | |||
| MethodName: "PickProp", | |||
| Handler: _AvailableService_PickProp_Handler, | |||
| }, | |||
| { | |||
| MethodName: "UseProp", | |||
| Handler: _AvailableService_UseProp_Handler, | |||
| }, | |||
| { | |||
| MethodName: "ThrowProp", | |||
| Handler: _AvailableService_ThrowProp_Handler, | |||
| }, | |||
| { | |||
| MethodName: "UseSkill", | |||
| Handler: _AvailableService_UseSkill_Handler, | |||
| }, | |||
| { | |||
| MethodName: "SendMessage", | |||
| Handler: _AvailableService_SendMessage_Handler, | |||
| }, | |||
| { | |||
| MethodName: "StartLearning", | |||
| Handler: _AvailableService_StartLearning_Handler, | |||
| }, | |||
| { | |||
| MethodName: "StartRescueMate", | |||
| Handler: _AvailableService_StartRescueMate_Handler, | |||
| }, | |||
| { | |||
| MethodName: "StartTreatMate", | |||
| Handler: _AvailableService_StartTreatMate_Handler, | |||
| }, | |||
| { | |||
| MethodName: "Attack", | |||
| Handler: _AvailableService_Attack_Handler, | |||
| }, | |||
| { | |||
| MethodName: "Graduate", | |||
| Handler: _AvailableService_Graduate_Handler, | |||
| }, | |||
| { | |||
| MethodName: "OpenDoor", | |||
| Handler: _AvailableService_OpenDoor_Handler, | |||
| }, | |||
| { | |||
| MethodName: "CloseDoor", | |||
| Handler: _AvailableService_CloseDoor_Handler, | |||
| }, | |||
| { | |||
| MethodName: "SkipWindow", | |||
| Handler: _AvailableService_SkipWindow_Handler, | |||
| }, | |||
| { | |||
| MethodName: "StartOpenGate", | |||
| Handler: _AvailableService_StartOpenGate_Handler, | |||
| }, | |||
| { | |||
| MethodName: "StartOpenChest", | |||
| Handler: _AvailableService_StartOpenChest_Handler, | |||
| }, | |||
| { | |||
| MethodName: "EndAllAction", | |||
| Handler: _AvailableService_EndAllAction_Handler, | |||
| }, | |||
| }, | |||
| Streams: []grpc.StreamDesc{ | |||
| { | |||
| StreamName: "AddPlayer", | |||
| Handler: _AvailableService_AddPlayer_Handler, | |||
| ServerStreams: true, | |||
| }, | |||
| }, | |||
| Metadata: "Services.proto", | |||
| } | |||
| @@ -0,0 +1,3 @@ | |||
| #!/usr/bin/env bash | |||
| ../../../dependency/proto/go_output.sh && go get | |||
| @@ -0,0 +1,14 @@ | |||
| package thuai6 | |||
| type IGameTimer interface { | |||
| StartTimer() | |||
| EndTimer() | |||
| Play(ai IAI) | |||
| } | |||
| type IAI interface { | |||
| StudentPlay(api IStudentAPI) | |||
| TrickerPlay(api ITrickerAPI) | |||
| } | |||
| type CreateAIFunc = func(playerID int64) IAI | |||
| @@ -0,0 +1,15 @@ | |||
| package thuai6 | |||
| type IAPI interface { | |||
| Move(timeInMilliseconds int64, angleInRadian float64) <-chan bool | |||
| } | |||
| type IStudentAPI interface { | |||
| IAPI | |||
| GetSelfInfo() *Student | |||
| } | |||
| type ITrickerAPI interface { | |||
| IAPI | |||
| GetSelfInfo() *Tricker | |||
| } | |||
| @@ -0,0 +1,7 @@ | |||
| package thuai6 | |||
| type State struct { | |||
| StudentSelf *Student | |||
| TrickerSelf *Tricker | |||
| Guids []int64 | |||
| } | |||
| @@ -0,0 +1,55 @@ | |||
| package thuai6 | |||
| type GameState int8 | |||
| const ( | |||
| NullGameState GameState = 0 | |||
| GameStart GameState = 1 | |||
| GameRunning GameState = 2 | |||
| GameEnd GameState = 3 | |||
| ) | |||
| type PlayerType int8 | |||
| const ( | |||
| NullPlayerType PlayerType = 0 | |||
| StudentPlayer PlayerType = 1 | |||
| TrickerPlayer PlayerType = 2 | |||
| ) | |||
| type StudentType int8 | |||
| const ( | |||
| NullStudentType StudentType = 0 | |||
| Athlete StudentType = 1 | |||
| Teacher StudentType = 2 | |||
| StraightAStudent StudentType = 3 | |||
| Robot StudentType = 4 | |||
| TechOtaku StudentType = 5 | |||
| Sunshine StudentType = 6 | |||
| ) | |||
| type TrickerType int8 | |||
| const ( | |||
| NullTrickerType TrickerType = 0 | |||
| Assassin TrickerType = 1 | |||
| Klee TrickerType = 2 | |||
| ANoisyPerson TrickerType = 3 | |||
| Idol TrickerType = 4 | |||
| ) | |||
| type Player struct { | |||
| x int32 | |||
| y int32 | |||
| } | |||
| type Student struct { | |||
| Player | |||
| determination int32 | |||
| } | |||
| type Tricker struct { | |||
| Player | |||
| trickDesire float64 | |||
| } | |||
| @@ -0,0 +1,38 @@ | |||
| package thuai6 | |||
| import ( | |||
| pb "API/proto" | |||
| ) | |||
| var ( | |||
| PlayerTypeToProto map[PlayerType]pb.PlayerType = map[PlayerType]pb.PlayerType{ | |||
| NullPlayerType: pb.PlayerType_NULL_PLAYER_TYPE, | |||
| StudentPlayer: pb.PlayerType_STUDENT_PLAYER, | |||
| TrickerPlayer: pb.PlayerType_TRICKER_PLAYER, | |||
| } | |||
| StudentTypeToProto map[StudentType]pb.StudentType = map[StudentType]pb.StudentType{ | |||
| NullStudentType: pb.StudentType_NULL_STUDENT_TYPE, | |||
| Athlete: pb.StudentType_ATHLETE, | |||
| Teacher: pb.StudentType_TEACHER, | |||
| StraightAStudent: pb.StudentType_STRAIGHT_A_STUDENT, | |||
| Robot: pb.StudentType_ROBOT, | |||
| TechOtaku: pb.StudentType_TECH_OTAKU, | |||
| Sunshine: pb.StudentType_SUNSHINE, | |||
| } | |||
| TrickerTypeToProto map[TrickerType]pb.TrickerType = map[TrickerType]pb.TrickerType{ | |||
| NullTrickerType: pb.TrickerType_NULL_TRICKER_TYPE, | |||
| Assassin: pb.TrickerType_ASSASSIN, | |||
| Klee: pb.TrickerType_KLEE, | |||
| ANoisyPerson: pb.TrickerType_A_NOISY_PERSON, | |||
| Idol: pb.TrickerType_IDOL, | |||
| } | |||
| GameStateToTHUAI6 map[pb.GameState]GameState = map[pb.GameState]GameState{ | |||
| pb.GameState_NULL_GAME_STATE: NullGameState, | |||
| pb.GameState_GAME_START: GameStart, | |||
| pb.GameState_GAME_RUNNING: GameRunning, | |||
| pb.GameState_GAME_END: GameEnd, | |||
| } | |||
| ) | |||
| @@ -0,0 +1,204 @@ | |||
| // Message2Client | |||
| syntax = "proto3"; | |||
| package protobuf; | |||
| import "MessageType.proto"; | |||
| message MessageOfStudent | |||
| { | |||
| int32 x = 1; | |||
| int32 y = 2; | |||
| int32 speed = 3; | |||
| int32 determination = 4; // 剩余的学习毅力,相当于血量 | |||
| int32 addiction = 5; // 沉迷程度,相当于淘汰进度 | |||
| repeated double time_until_skill_available = 6; | |||
| PlaceType place = 7; | |||
| repeated PropType prop = 8; | |||
| PlayerState player_state = 9; | |||
| int64 guid = 10; | |||
| BulletType bullet_type = 12; | |||
| int32 learning_speed = 13; // 修理电机的速度 | |||
| int32 treat_speed = 14; // 治疗的速度 | |||
| int64 player_id = 15; | |||
| int32 view_range = 16; // 视野距离 | |||
| int32 radius = 17; // 半径 | |||
| double danger_alert = 19; // 危险警报,在捣蛋鬼靠近时会有预警 | |||
| int32 score = 20; | |||
| int32 treat_progress = 21; // 治疗进度 | |||
| int32 rescue_progress = 22; // 救援进度 | |||
| StudentType student_type = 23; | |||
| double facing_direction = 24; | |||
| repeated StudentBuffType buff = 25; | |||
| } | |||
| message MessageOfTricker | |||
| { | |||
| int32 x = 1; | |||
| int32 y = 2; | |||
| int32 speed = 3; | |||
| repeated double time_until_skill_available = 5; | |||
| PlaceType place = 6; | |||
| repeated PropType prop = 7; | |||
| TrickerType tricker_type = 8; | |||
| int64 guid = 9; | |||
| int32 score = 10; | |||
| int64 player_id = 11; | |||
| int32 view_range = 12; // 视野距离 | |||
| int32 radius = 13; // 半径 | |||
| PlayerState player_state = 14; | |||
| double trick_desire = 15;//bgm | |||
| double class_volume = 16;//bgm | |||
| double facing_direction = 17; | |||
| BulletType bullet_type = 18; | |||
| repeated TrickerBuffType buff = 19; | |||
| } | |||
| message MessageOfBullet | |||
| { | |||
| BulletType type = 1; | |||
| int32 x = 2; | |||
| int32 y = 3; | |||
| double facing_direction = 4; | |||
| int64 guid = 5; | |||
| PlayerType team = 6; | |||
| PlaceType place = 7; | |||
| double bomb_range = 8; | |||
| int32 speed = 9; | |||
| } | |||
| message MessageOfBombedBullet //for Unity,直接继承自THUAI5 | |||
| { | |||
| BulletType type = 1; | |||
| int32 x = 2; | |||
| int32 y = 3; | |||
| double facing_direction = 4; | |||
| int64 mapping_id = 5; | |||
| double bomb_range = 6; | |||
| } | |||
| message MessageOfProp // 可拾取道具的信息 | |||
| { | |||
| PropType type = 1; | |||
| int32 x = 2; | |||
| int32 y = 3; | |||
| double facing_direction = 4; | |||
| int64 guid = 5; | |||
| PlaceType place = 6; | |||
| } | |||
| message MessageOfPickedProp //for Unity,直接继承自THUAI5 | |||
| { | |||
| PropType type = 1; | |||
| int32 x = 2; | |||
| int32 y = 3; | |||
| double facing_direction = 4; | |||
| int64 mapping_id = 5; | |||
| } | |||
| message MessageOfClassroom | |||
| { | |||
| int32 x = 1; | |||
| int32 y = 2; | |||
| int32 progress = 3; | |||
| } | |||
| message MessageOfGate | |||
| { | |||
| int32 x = 1; | |||
| int32 y = 2; | |||
| int32 progress = 3; | |||
| } | |||
| message MessageOfHiddenGate | |||
| { | |||
| int32 x = 1; | |||
| int32 y = 2; | |||
| bool opened = 3; | |||
| } | |||
| message MessageOfDoor | |||
| { | |||
| int32 x = 1; | |||
| int32 y = 2; | |||
| bool is_open = 3; | |||
| int32 progress = 4; | |||
| } | |||
| message MessageOfChest | |||
| { | |||
| int32 x = 1; | |||
| int32 y = 2; | |||
| int32 progress = 3; | |||
| } | |||
| message MessageOfMap | |||
| { | |||
| message Row | |||
| { | |||
| repeated PlaceType col = 1; | |||
| } | |||
| repeated Row row = 2; | |||
| } | |||
| message MessageOfNews | |||
| { | |||
| string news = 1; | |||
| int64 from_id = 2; | |||
| int64 to_id = 3; | |||
| } | |||
| message MessageOfObj | |||
| { | |||
| oneof message_of_obj | |||
| { | |||
| MessageOfStudent student_message = 1; | |||
| MessageOfTricker tricker_message = 2; | |||
| MessageOfProp prop_message = 3; | |||
| MessageOfBullet bullet_message = 4; | |||
| MessageOfBombedBullet bombed_bullet_message = 5; | |||
| MessageOfClassroom classroom_message = 6; | |||
| MessageOfDoor door_message = 7; | |||
| MessageOfGate gate_message = 8; | |||
| MessageOfChest chest_message = 9; | |||
| MessageOfHiddenGate hidden_gate_message = 10; | |||
| MessageOfNews news_message = 11; | |||
| MessageOfMap map_message = 12; | |||
| } | |||
| } | |||
| message MessageOfAll | |||
| { | |||
| int32 game_time = 1; | |||
| int32 subject_finished = 2; // 完成的科目数 | |||
| int32 student_graduated = 3; // 已经毕业的学生数 | |||
| int32 student_quited = 4; // 已经退学的学生数 | |||
| int32 student_score = 5; | |||
| int32 tricker_score = 6; | |||
| } | |||
| message MessageToClient | |||
| { | |||
| repeated MessageOfObj obj_message = 1; | |||
| GameState game_state = 2; | |||
| MessageOfAll all_message = 3; | |||
| } | |||
| message MoveRes // 如果打算设计撞墙保留平行速度分量,且需要返回值则可用这个(大概没啥用) | |||
| { | |||
| int64 actual_speed = 1; | |||
| double actual_angle = 2; | |||
| bool act_success = 3; | |||
| } | |||
| message BoolRes // 用于只需要判断执行操作是否成功的行为,如捡起道具、使用道具 | |||
| { | |||
| bool act_success = 1; | |||
| } | |||
| // message MsgRes // 用于获取队友发来的消息 | |||
| // { | |||
| // bool have_message = 1; // 是否有待接收的消息 | |||
| // int64 from_player_id = 2; | |||
| // string message_received = 3; | |||
| // } | |||
| @@ -0,0 +1,74 @@ | |||
| // Message2Server | |||
| syntax = "proto3"; | |||
| package protobuf; | |||
| import "MessageType.proto"; | |||
| message PlayerMsg | |||
| { | |||
| int64 player_id = 1; | |||
| oneof job_type | |||
| { | |||
| StudentType student_type = 2; | |||
| TrickerType tricker_type = 3; | |||
| } | |||
| PlayerType player_type = 4; | |||
| } | |||
| message MoveMsg | |||
| { | |||
| int64 player_id = 1; | |||
| double angle = 2; | |||
| int64 time_in_milliseconds = 3; | |||
| } | |||
| message PropMsg | |||
| { | |||
| int64 player_id = 1; | |||
| PropType prop_type = 2; | |||
| } | |||
| message SendMsg | |||
| { | |||
| int64 player_id = 1; | |||
| int64 to_player_id = 2; | |||
| string message = 3; | |||
| } | |||
| message AttackMsg // 相当于攻击 | |||
| { | |||
| int64 player_id = 1; | |||
| double angle = 2; | |||
| } | |||
| message IDMsg | |||
| { | |||
| int64 player_id = 1; | |||
| } | |||
| message TreatAndRescueMsg | |||
| { | |||
| int64 player_id = 1; | |||
| int64 to_player_id = 2; | |||
| } | |||
| message SkillMsg | |||
| { | |||
| int64 player_id = 1; | |||
| int32 skill_id = 2; | |||
| } | |||
| // 基本继承于THUAI5,为了使发送的信息尽可能不被浪费,暂定不发这类大包。 | |||
| // message MessageToServer | |||
| // { | |||
| // MessageType messageType = 1; | |||
| // int64 playerID = 2; // 消息发送者的playerID | |||
| // PlayerType playerType = 3; | |||
| // HumanType humanType= 4; | |||
| // TrickerType trickerType = 5; | |||
| // double angle = 6; // messageType为Move, Attack时的角度 | |||
| // PropType propType = 7; // messageType为PickProp时要捡起的道具类型,防止多个道具堆叠时出现问题 | |||
| // int64 timeInMilliseconds = 8;//时间参数 | |||
| // int64 ToPlayerID = 9; // messageType为Send时要发送的对象的ID | |||
| // string message = 10; // messageType为Send时发送的消息内容 | |||
| // } | |||
| @@ -0,0 +1,132 @@ | |||
| // MessageType | |||
| syntax = "proto3"; | |||
| package protobuf; | |||
| enum BulletType | |||
| { | |||
| NULL_BULLET_TYPE = 0; | |||
| FLYING_KNIFE = 1; | |||
| COMMON_ATTACK_OF_TRICKER = 2; | |||
| BOMB_BOMB = 3; | |||
| JUMPY_DUMPTY = 4; | |||
| ATOM_BOMB = 5; | |||
| } | |||
| enum PlaceType // 地图中的所有物件类型 | |||
| { | |||
| NULL_PLACE_TYPE = 0; | |||
| // 地图情况,其中Gate是总体的大门,HiddenGate是地窖 | |||
| LAND = 1; | |||
| WALL = 2; | |||
| GRASS = 3; | |||
| CLASSROOM = 4; | |||
| GATE = 5; | |||
| HIDDEN_GATE = 6; | |||
| WINDOW = 7; | |||
| DOOR3 = 8; | |||
| DOOR5 = 9; | |||
| DOOR6 = 10; | |||
| CHEST = 11; | |||
| // 待补充有特殊效果的地形 | |||
| } | |||
| enum ShapeType // 形状类型 | |||
| { | |||
| NULL_SHAPE_TYPE = 0; | |||
| CIRCLE = 1; // 人类、屠夫、可拾取道具等为圆形 | |||
| SQUARE = 2; // 地形均为方形 | |||
| } | |||
| enum PropType // 地图中的可拾取道具类型 | |||
| { | |||
| NULL_PROP_TYPE = 0; | |||
| ADD_SPEED = 1; | |||
| ADD_LIFE_OR_CLAIRAUDIENCE = 2; | |||
| ADD_HP_OR_AP = 3; | |||
| SHIELD_OR_SPEAR = 4; | |||
| KEY3 = 5; | |||
| KEY5 = 6; | |||
| KEY6 = 7; | |||
| RECOVERY_FROM_DIZZINESS = 8; | |||
| } | |||
| enum StudentBuffType // 人类可用的增益效果类型 | |||
| { | |||
| NULL_SBUFF_TYPE = 0; | |||
| STUDENT_ADD_SPEED = 1; | |||
| ADD_LIFE = 2; | |||
| SHIELD = 3; | |||
| STUDENT_INVISIBLE = 4; | |||
| } | |||
| enum PlayerState | |||
| { | |||
| NULL_STATUS = 0; | |||
| IDLE = 1; // 正常状态 | |||
| LEARNING = 2; // 学习状态,相当于在修机器 | |||
| ADDICTED = 3; // 血条归零后原地沉迷游戏 | |||
| QUIT = 4; // 退学状态,相当于寄了 | |||
| GRADUATED = 5; // 毕业状态,相当于逃脱了 | |||
| TREATED = 6; | |||
| RESCUED = 7; | |||
| STUNNED = 8; | |||
| TREATING = 9; | |||
| RESCUING = 10; | |||
| SWINGING = 11; // 后摇 | |||
| ATTACKING = 12; // 前摇 | |||
| LOCKING = 13; | |||
| RUMMAGING = 14; | |||
| CLIMBING = 15; // 翻窗 | |||
| OPENING_A_CHEST =16; | |||
| USING_SPECIAL_SKILL = 17; | |||
| OPENING_A_GATE =18; | |||
| } | |||
| enum TrickerBuffType // 屠夫可用的增益效果类型 | |||
| { | |||
| NULL_TBUFF_TYPE = 0; | |||
| TRICKER_ADD_SPEED = 1; | |||
| SPEAR = 2; | |||
| ADD_AP = 3; | |||
| CLAIRAUDIENCE = 4; | |||
| TRICKER_INVISIBLE = 5; | |||
| } | |||
| // 特别说明:由于Student阵营和Tricker阵营有显著的隔离,且暂定职业、主动技能和被动效果相互绑定,故不按照THUAI5的方式区分ActiveSkillType和CharacterType,而是选择了按照阵营来给不同阵营赋予不同的职业(及技能)。 | |||
| enum PlayerType | |||
| { | |||
| NULL_PLAYER_TYPE = 0; | |||
| STUDENT_PLAYER = 1; | |||
| TRICKER_PLAYER = 2; | |||
| } | |||
| enum StudentType | |||
| { | |||
| NULL_STUDENT_TYPE = 0; | |||
| ATHLETE = 1; | |||
| TEACHER = 2; | |||
| STRAIGHT_A_STUDENT = 3; | |||
| ROBOT = 4; | |||
| TECH_OTAKU =5; | |||
| SUNSHINE = 6; | |||
| } | |||
| enum TrickerType | |||
| { | |||
| NULL_TRICKER_TYPE = 0; | |||
| ASSASSIN = 1; | |||
| KLEE = 2; | |||
| A_NOISY_PERSON = 3; | |||
| IDOL = 4; | |||
| } | |||
| // 游戏进行状态 | |||
| enum GameState | |||
| { | |||
| NULL_GAME_STATE = 0; | |||
| GAME_START = 1; | |||
| GAME_RUNNING = 2; | |||
| GAME_END = 3; | |||
| } | |||
| @@ -0,0 +1,33 @@ | |||
| syntax = "proto3"; | |||
| package protobuf; | |||
| import "Message2Clients.proto"; | |||
| import "Message2Server.proto"; | |||
| service AvailableService | |||
| { | |||
| rpc TryConnection (IDMsg) returns(BoolRes); | |||
| // 游戏开局调用一次的服务 | |||
| rpc AddPlayer (PlayerMsg) returns(stream MessageToClient); // 连接上后等待游戏开始,server会定时通过该服务向所有client发送消息。 | |||
| // 游戏过程中玩家执行操作的服务 | |||
| rpc Move (MoveMsg) returns (MoveRes); | |||
| rpc PickProp (PropMsg) returns (BoolRes); | |||
| rpc UseProp (PropMsg) returns (BoolRes); | |||
| rpc ThrowProp (PropMsg) returns (BoolRes); | |||
| rpc UseSkill (SkillMsg) returns (BoolRes); | |||
| rpc SendMessage (SendMsg) returns (BoolRes); | |||
| // rpc GetMessage (IDMsg) returns (stream MsgRes); | |||
| rpc StartLearning (IDMsg) returns (BoolRes); // 开始修理机器 | |||
| rpc StartRescueMate (TreatAndRescueMsg) returns (BoolRes); // 开始救人 | |||
| rpc StartTreatMate (TreatAndRescueMsg) returns (BoolRes); // 开始治疗 | |||
| rpc Attack (AttackMsg) returns (BoolRes); // 攻击 | |||
| rpc Graduate (IDMsg) returns (BoolRes); // 相当于逃跑 | |||
| rpc OpenDoor (IDMsg) returns (BoolRes); // 开门 | |||
| rpc CloseDoor (IDMsg) returns (BoolRes); // 关门 | |||
| rpc SkipWindow (IDMsg) returns (BoolRes); // 窗户 | |||
| rpc StartOpenGate (IDMsg) returns (BoolRes); // 开闸门 | |||
| rpc StartOpenChest (IDMsg) returns (BoolRes); | |||
| rpc EndAllAction (IDMsg) returns (BoolRes); // 结束所有动作 | |||
| } | |||
| @@ -0,0 +1,10 @@ | |||
| version: v1 | |||
| managed: | |||
| enabled: true | |||
| go_package_prefix: | |||
| default: proto | |||
| plugins: | |||
| - name: gotag | |||
| out: . | |||
| opt: | |||
| - auto=bson | |||
| @@ -0,0 +1,14 @@ | |||
| version: v1 | |||
| managed: | |||
| enabled: true | |||
| go_package_prefix: | |||
| default: job-API/proto | |||
| plugins: | |||
| - name: go | |||
| out: proto | |||
| opt: paths=source_relative | |||
| - name: go-grpc | |||
| out: proto | |||
| opt: | |||
| - paths=source_relative | |||
| - require_unimplemented_servers=false | |||
| @@ -0,0 +1,10 @@ | |||
| #!/usr/bin/env bash | |||
| set -e | |||
| PROTO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" | |||
| pushd "${PROTO_DIR}" | |||
| buf generate | |||
| rm -rf ../../CAPI/go/API/proto | |||
| mv -f proto ../../CAPI/go/API | |||
| popd | |||