diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea011b4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,40 @@ +# Copyright 2017 Google LLC All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +.idea +!.gitignore +!.helmignore +!.gitattributes +!.dockerignore +!.golangci.yml +!.gcloudignore +!.eslintrc.* +!.nycrc +!.clang-format +!.github +*.iml +bin +*.o +tmp +terraform.tfvars +terraform.tfstate* +kubeconfig +build/local-includes/* +build/allocation +!build/local-includes/README.md +/release +debug.test +obj +test/sdk/cpp/sdk/ + diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 0000000..9c83626 --- /dev/null +++ b/buf.yaml @@ -0,0 +1,8 @@ +version: v1 +deps: +breaking: + use: + - FILE +lint: + use: + - DEFAULT diff --git a/dof/Makefile b/dof/Makefile new file mode 100644 index 0000000..c4dcf54 --- /dev/null +++ b/dof/Makefile @@ -0,0 +1,2 @@ +dof-gen: + buf generate messages.proto diff --git a/dof/README.md b/dof/README.md new file mode 100644 index 0000000..685b8a6 --- /dev/null +++ b/dof/README.md @@ -0,0 +1,5 @@ +# dof-gve 玩法数据交互 protobuf + +参考文档: + +https://docs.google.com/document/d/1HqIjaiMRcVs-JIzqhluMm2eLnmQ2FCs1MCw5s9nEkjs diff --git a/dof/buf.gen.yaml b/dof/buf.gen.yaml new file mode 100644 index 0000000..e5f04ae --- /dev/null +++ b/dof/buf.gen.yaml @@ -0,0 +1,4 @@ +version: v1 +plugins: + - plugin: buf.build/protocolbuffers/go + out: go diff --git a/dof/go/messages.pb.go b/dof/go/messages.pb.go new file mode 100644 index 0000000..039fa70 --- /dev/null +++ b/dof/go/messages.pb.go @@ -0,0 +1,1234 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: dof/messages.proto + +package pb + +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) +) + +// ClientInitialize 服务端接收到 PlayerEnter 消息后发还给客户端的回执 +type ClientInitialize struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cid int64 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (x *ClientInitialize) Reset() { + *x = ClientInitialize{} + if protoimpl.UnsafeEnabled { + mi := &file_dof_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientInitialize) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientInitialize) ProtoMessage() {} + +func (x *ClientInitialize) ProtoReflect() protoreflect.Message { + mi := &file_dof_messages_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 ClientInitialize.ProtoReflect.Descriptor instead. +func (*ClientInitialize) Descriptor() ([]byte, []int) { + return file_dof_messages_proto_rawDescGZIP(), []int{0} +} + +func (x *ClientInitialize) GetCid() int64 { + if x != nil { + return x.Cid + } + return 0 +} + +// ClientMessage 客户端发送给服务端的消息类型 +type ClientMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Actual: + // + // *ClientMessage_PlayerEnter + // *ClientMessage_LevelPrepared + // *ClientMessage_PointFound + // *ClientMessage_LevelEnd + // *ClientMessage_AllLevelEnd + // *ClientMessage_PlayerLeave + Actual isClientMessage_Actual `protobuf_oneof:"actual"` +} + +func (x *ClientMessage) Reset() { + *x = ClientMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_dof_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientMessage) ProtoMessage() {} + +func (x *ClientMessage) ProtoReflect() protoreflect.Message { + mi := &file_dof_messages_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 ClientMessage.ProtoReflect.Descriptor instead. +func (*ClientMessage) Descriptor() ([]byte, []int) { + return file_dof_messages_proto_rawDescGZIP(), []int{1} +} + +func (m *ClientMessage) GetActual() isClientMessage_Actual { + if m != nil { + return m.Actual + } + return nil +} + +func (x *ClientMessage) GetPlayerEnter() *PlayerEnter { + if x, ok := x.GetActual().(*ClientMessage_PlayerEnter); ok { + return x.PlayerEnter + } + return nil +} + +func (x *ClientMessage) GetLevelPrepared() *LevelPrepared { + if x, ok := x.GetActual().(*ClientMessage_LevelPrepared); ok { + return x.LevelPrepared + } + return nil +} + +func (x *ClientMessage) GetPointFound() *PointFound { + if x, ok := x.GetActual().(*ClientMessage_PointFound); ok { + return x.PointFound + } + return nil +} + +func (x *ClientMessage) GetLevelEnd() *LevelEnd { + if x, ok := x.GetActual().(*ClientMessage_LevelEnd); ok { + return x.LevelEnd + } + return nil +} + +func (x *ClientMessage) GetAllLevelEnd() *AllLevelEnd { + if x, ok := x.GetActual().(*ClientMessage_AllLevelEnd); ok { + return x.AllLevelEnd + } + return nil +} + +func (x *ClientMessage) GetPlayerLeave() *PlayerLeave { + if x, ok := x.GetActual().(*ClientMessage_PlayerLeave); ok { + return x.PlayerLeave + } + return nil +} + +type isClientMessage_Actual interface { + isClientMessage_Actual() +} + +type ClientMessage_PlayerEnter struct { + PlayerEnter *PlayerEnter `protobuf:"bytes,1,opt,name=player_enter,json=playerEnter,proto3,oneof"` +} + +type ClientMessage_LevelPrepared struct { + LevelPrepared *LevelPrepared `protobuf:"bytes,2,opt,name=level_prepared,json=levelPrepared,proto3,oneof"` +} + +type ClientMessage_PointFound struct { + PointFound *PointFound `protobuf:"bytes,3,opt,name=point_found,json=pointFound,proto3,oneof"` +} + +type ClientMessage_LevelEnd struct { + LevelEnd *LevelEnd `protobuf:"bytes,4,opt,name=level_end,json=levelEnd,proto3,oneof"` +} + +type ClientMessage_AllLevelEnd struct { + AllLevelEnd *AllLevelEnd `protobuf:"bytes,5,opt,name=all_level_end,json=allLevelEnd,proto3,oneof"` +} + +type ClientMessage_PlayerLeave struct { + PlayerLeave *PlayerLeave `protobuf:"bytes,6,opt,name=player_leave,json=playerLeave,proto3,oneof"` +} + +func (*ClientMessage_PlayerEnter) isClientMessage_Actual() {} + +func (*ClientMessage_LevelPrepared) isClientMessage_Actual() {} + +func (*ClientMessage_PointFound) isClientMessage_Actual() {} + +func (*ClientMessage_LevelEnd) isClientMessage_Actual() {} + +func (*ClientMessage_AllLevelEnd) isClientMessage_Actual() {} + +func (*ClientMessage_PlayerLeave) isClientMessage_Actual() {} + +// ServerMessage 服务端发送给客户端的消息类型 +type ServerMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Actual: + // + // *ServerMessage_GameStart + // *ServerMessage_LevalStart + // *ServerMessage_PointFound + // *ServerMessage_GameFinish + Actual isServerMessage_Actual `protobuf_oneof:"actual"` +} + +func (x *ServerMessage) Reset() { + *x = ServerMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_dof_messages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerMessage) ProtoMessage() {} + +func (x *ServerMessage) ProtoReflect() protoreflect.Message { + mi := &file_dof_messages_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 ServerMessage.ProtoReflect.Descriptor instead. +func (*ServerMessage) Descriptor() ([]byte, []int) { + return file_dof_messages_proto_rawDescGZIP(), []int{2} +} + +func (m *ServerMessage) GetActual() isServerMessage_Actual { + if m != nil { + return m.Actual + } + return nil +} + +func (x *ServerMessage) GetGameStart() *GameStart { + if x, ok := x.GetActual().(*ServerMessage_GameStart); ok { + return x.GameStart + } + return nil +} + +func (x *ServerMessage) GetLevalStart() *LevalStart { + if x, ok := x.GetActual().(*ServerMessage_LevalStart); ok { + return x.LevalStart + } + return nil +} + +func (x *ServerMessage) GetPointFound() *PointFound { + if x, ok := x.GetActual().(*ServerMessage_PointFound); ok { + return x.PointFound + } + return nil +} + +func (x *ServerMessage) GetGameFinish() *GameFinish { + if x, ok := x.GetActual().(*ServerMessage_GameFinish); ok { + return x.GameFinish + } + return nil +} + +type isServerMessage_Actual interface { + isServerMessage_Actual() +} + +type ServerMessage_GameStart struct { + GameStart *GameStart `protobuf:"bytes,1,opt,name=game_start,json=gameStart,proto3,oneof"` +} + +type ServerMessage_LevalStart struct { + LevalStart *LevalStart `protobuf:"bytes,2,opt,name=leval_start,json=levalStart,proto3,oneof"` +} + +type ServerMessage_PointFound struct { + PointFound *PointFound `protobuf:"bytes,3,opt,name=point_found,json=pointFound,proto3,oneof"` +} + +type ServerMessage_GameFinish struct { + GameFinish *GameFinish `protobuf:"bytes,4,opt,name=game_finish,json=gameFinish,proto3,oneof"` +} + +func (*ServerMessage_GameStart) isServerMessage_Actual() {} + +func (*ServerMessage_LevalStart) isServerMessage_Actual() {} + +func (*ServerMessage_PointFound) isServerMessage_Actual() {} + +func (*ServerMessage_GameFinish) isServerMessage_Actual() {} + +// PlayerEnter 客户端进入房间 +type PlayerEnter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + NickName string `protobuf:"bytes,3,opt,name=nick_name,json=nickName,proto3" json:"nick_name,omitempty"` + Country string `protobuf:"bytes,4,opt,name=country,proto3" json:"country,omitempty"` +} + +func (x *PlayerEnter) Reset() { + *x = PlayerEnter{} + if protoimpl.UnsafeEnabled { + mi := &file_dof_messages_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlayerEnter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerEnter) ProtoMessage() {} + +func (x *PlayerEnter) ProtoReflect() protoreflect.Message { + mi := &file_dof_messages_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 PlayerEnter.ProtoReflect.Descriptor instead. +func (*PlayerEnter) Descriptor() ([]byte, []int) { + return file_dof_messages_proto_rawDescGZIP(), []int{3} +} + +func (x *PlayerEnter) GetRoomId() string { + if x != nil { + return x.RoomId + } + return "" +} + +func (x *PlayerEnter) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *PlayerEnter) GetNickName() string { + if x != nil { + return x.NickName + } + return "" +} + +func (x *PlayerEnter) GetCountry() string { + if x != nil { + return x.Country + } + return "" +} + +type LevelResource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Level string `protobuf:"bytes,1,opt,name=level,proto3" json:"level,omitempty"` +} + +func (x *LevelResource) Reset() { + *x = LevelResource{} + if protoimpl.UnsafeEnabled { + mi := &file_dof_messages_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LevelResource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LevelResource) ProtoMessage() {} + +func (x *LevelResource) ProtoReflect() protoreflect.Message { + mi := &file_dof_messages_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 LevelResource.ProtoReflect.Descriptor instead. +func (*LevelResource) Descriptor() ([]byte, []int) { + return file_dof_messages_proto_rawDescGZIP(), []int{4} +} + +func (x *LevelResource) GetLevel() string { + if x != nil { + return x.Level + } + return "" +} + +type GameStart struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LevelResource []*LevelResource `protobuf:"bytes,1,rep,name=level_resource,json=levelResource,proto3" json:"level_resource,omitempty"` +} + +func (x *GameStart) Reset() { + *x = GameStart{} + if protoimpl.UnsafeEnabled { + mi := &file_dof_messages_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GameStart) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GameStart) ProtoMessage() {} + +func (x *GameStart) ProtoReflect() protoreflect.Message { + mi := &file_dof_messages_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 GameStart.ProtoReflect.Descriptor instead. +func (*GameStart) Descriptor() ([]byte, []int) { + return file_dof_messages_proto_rawDescGZIP(), []int{5} +} + +func (x *GameStart) GetLevelResource() []*LevelResource { + if x != nil { + return x.LevelResource + } + return nil +} + +type LevelPrepared struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cid int64 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (x *LevelPrepared) Reset() { + *x = LevelPrepared{} + if protoimpl.UnsafeEnabled { + mi := &file_dof_messages_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LevelPrepared) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LevelPrepared) ProtoMessage() {} + +func (x *LevelPrepared) ProtoReflect() protoreflect.Message { + mi := &file_dof_messages_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 LevelPrepared.ProtoReflect.Descriptor instead. +func (*LevelPrepared) Descriptor() ([]byte, []int) { + return file_dof_messages_proto_rawDescGZIP(), []int{6} +} + +func (x *LevelPrepared) GetCid() int64 { + if x != nil { + return x.Cid + } + return 0 +} + +type LevalStart struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Level string `protobuf:"bytes,1,opt,name=level,proto3" json:"level,omitempty"` +} + +func (x *LevalStart) Reset() { + *x = LevalStart{} + if protoimpl.UnsafeEnabled { + mi := &file_dof_messages_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LevalStart) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LevalStart) ProtoMessage() {} + +func (x *LevalStart) ProtoReflect() protoreflect.Message { + mi := &file_dof_messages_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 LevalStart.ProtoReflect.Descriptor instead. +func (*LevalStart) Descriptor() ([]byte, []int) { + return file_dof_messages_proto_rawDescGZIP(), []int{7} +} + +func (x *LevalStart) GetLevel() string { + if x != nil { + return x.Level + } + return "" +} + +type PointFound struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cid int64 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid,omitempty"` + Level string `protobuf:"bytes,2,opt,name=level,proto3" json:"level,omitempty"` + PointId int64 `protobuf:"varint,3,opt,name=point_id,json=pointId,proto3" json:"point_id,omitempty"` +} + +func (x *PointFound) Reset() { + *x = PointFound{} + if protoimpl.UnsafeEnabled { + mi := &file_dof_messages_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PointFound) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PointFound) ProtoMessage() {} + +func (x *PointFound) ProtoReflect() protoreflect.Message { + mi := &file_dof_messages_proto_msgTypes[8] + 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 PointFound.ProtoReflect.Descriptor instead. +func (*PointFound) Descriptor() ([]byte, []int) { + return file_dof_messages_proto_rawDescGZIP(), []int{8} +} + +func (x *PointFound) GetCid() int64 { + if x != nil { + return x.Cid + } + return 0 +} + +func (x *PointFound) GetLevel() string { + if x != nil { + return x.Level + } + return "" +} + +func (x *PointFound) GetPointId() int64 { + if x != nil { + return x.PointId + } + return 0 +} + +type LevelEnd struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cid int64 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid,omitempty"` + Level string `protobuf:"bytes,2,opt,name=level,proto3" json:"level,omitempty"` +} + +func (x *LevelEnd) Reset() { + *x = LevelEnd{} + if protoimpl.UnsafeEnabled { + mi := &file_dof_messages_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LevelEnd) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LevelEnd) ProtoMessage() {} + +func (x *LevelEnd) ProtoReflect() protoreflect.Message { + mi := &file_dof_messages_proto_msgTypes[9] + 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 LevelEnd.ProtoReflect.Descriptor instead. +func (*LevelEnd) Descriptor() ([]byte, []int) { + return file_dof_messages_proto_rawDescGZIP(), []int{9} +} + +func (x *LevelEnd) GetCid() int64 { + if x != nil { + return x.Cid + } + return 0 +} + +func (x *LevelEnd) GetLevel() string { + if x != nil { + return x.Level + } + return "" +} + +type AllLevelEnd struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cid int64 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (x *AllLevelEnd) Reset() { + *x = AllLevelEnd{} + if protoimpl.UnsafeEnabled { + mi := &file_dof_messages_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllLevelEnd) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllLevelEnd) ProtoMessage() {} + +func (x *AllLevelEnd) ProtoReflect() protoreflect.Message { + mi := &file_dof_messages_proto_msgTypes[10] + 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 AllLevelEnd.ProtoReflect.Descriptor instead. +func (*AllLevelEnd) Descriptor() ([]byte, []int) { + return file_dof_messages_proto_rawDescGZIP(), []int{10} +} + +func (x *AllLevelEnd) GetCid() int64 { + if x != nil { + return x.Cid + } + return 0 +} + +type GameScore struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + Score int64 `protobuf:"varint,2,opt,name=score,proto3" json:"score,omitempty"` +} + +func (x *GameScore) Reset() { + *x = GameScore{} + if protoimpl.UnsafeEnabled { + mi := &file_dof_messages_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GameScore) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GameScore) ProtoMessage() {} + +func (x *GameScore) ProtoReflect() protoreflect.Message { + mi := &file_dof_messages_proto_msgTypes[11] + 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 GameScore.ProtoReflect.Descriptor instead. +func (*GameScore) Descriptor() ([]byte, []int) { + return file_dof_messages_proto_rawDescGZIP(), []int{11} +} + +func (x *GameScore) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *GameScore) GetScore() int64 { + if x != nil { + return x.Score + } + return 0 +} + +type GameFinish struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Scores []*GameScore `protobuf:"bytes,1,rep,name=scores,proto3" json:"scores,omitempty"` +} + +func (x *GameFinish) Reset() { + *x = GameFinish{} + if protoimpl.UnsafeEnabled { + mi := &file_dof_messages_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GameFinish) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GameFinish) ProtoMessage() {} + +func (x *GameFinish) ProtoReflect() protoreflect.Message { + mi := &file_dof_messages_proto_msgTypes[12] + 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 GameFinish.ProtoReflect.Descriptor instead. +func (*GameFinish) Descriptor() ([]byte, []int) { + return file_dof_messages_proto_rawDescGZIP(), []int{12} +} + +func (x *GameFinish) GetScores() []*GameScore { + if x != nil { + return x.Scores + } + return nil +} + +type PlayerLeave struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cid int64 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (x *PlayerLeave) Reset() { + *x = PlayerLeave{} + if protoimpl.UnsafeEnabled { + mi := &file_dof_messages_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlayerLeave) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerLeave) ProtoMessage() {} + +func (x *PlayerLeave) ProtoReflect() protoreflect.Message { + mi := &file_dof_messages_proto_msgTypes[13] + 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 PlayerLeave.ProtoReflect.Descriptor instead. +func (*PlayerLeave) Descriptor() ([]byte, []int) { + return file_dof_messages_proto_rawDescGZIP(), []int{13} +} + +func (x *PlayerLeave) GetCid() int64 { + if x != nil { + return x.Cid + } + return 0 +} + +var File_dof_messages_proto protoreflect.FileDescriptor + +var file_dof_messages_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x64, 0x6f, 0x66, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x64, 0x6f, 0x66, 0x22, 0x24, 0x0a, 0x10, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, + 0xde, 0x02, 0x0a, 0x0d, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x74, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x6f, 0x66, 0x2e, 0x50, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0e, 0x6c, 0x65, 0x76, 0x65, + 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x64, 0x6f, 0x66, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x50, 0x72, 0x65, 0x70, + 0x61, 0x72, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0d, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x50, 0x72, 0x65, + 0x70, 0x61, 0x72, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x0b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x66, + 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x6f, 0x66, + 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x0a, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x2c, 0x0a, 0x09, 0x6c, 0x65, 0x76, + 0x65, 0x6c, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x64, + 0x6f, 0x66, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x08, 0x6c, + 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x5f, 0x6c, + 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x64, 0x6f, 0x66, 0x2e, 0x41, 0x6c, 0x6c, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x64, + 0x48, 0x00, 0x52, 0x0b, 0x61, 0x6c, 0x6c, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x12, + 0x35, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x6f, 0x66, 0x2e, 0x50, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, + 0x22, 0xe6, 0x01, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x0a, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x6f, 0x66, 0x2e, 0x47, 0x61, 0x6d, + 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x48, 0x00, 0x52, 0x09, 0x67, 0x61, 0x6d, 0x65, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x12, 0x32, 0x0a, 0x0b, 0x6c, 0x65, 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x6f, 0x66, 0x2e, 0x4c, + 0x65, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x6c, 0x65, 0x76, + 0x61, 0x6c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x32, 0x0a, 0x0b, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, + 0x6f, 0x66, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x00, 0x52, + 0x0a, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x32, 0x0a, 0x0b, 0x67, + 0x61, 0x6d, 0x65, 0x5f, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x64, 0x6f, 0x66, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, + 0x68, 0x48, 0x00, 0x52, 0x0a, 0x67, 0x61, 0x6d, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x42, + 0x08, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x22, 0x6f, 0x0a, 0x0b, 0x50, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, + 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x69, 0x63, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x25, 0x0a, 0x0d, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, + 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, + 0x6c, 0x22, 0x46, 0x0a, 0x09, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x39, + 0x0a, 0x0e, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x6f, 0x66, 0x2e, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0d, 0x6c, 0x65, 0x76, 0x65, + 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x0d, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0x22, 0x0a, 0x0a, + 0x4c, 0x65, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x22, 0x4f, 0x0a, 0x0a, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x10, + 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x63, 0x69, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x49, + 0x64, 0x22, 0x32, 0x0a, 0x08, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x12, 0x10, 0x0a, + 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, + 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x1f, 0x0a, 0x0b, 0x41, 0x6c, 0x6c, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x45, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0x33, 0x0a, 0x09, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x63, + 0x6f, 0x72, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x34, 0x0a, 0x0a, 0x47, + 0x61, 0x6d, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x06, 0x73, 0x63, 0x6f, + 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x6f, 0x66, 0x2e, + 0x47, 0x61, 0x6d, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x72, 0x65, + 0x73, 0x22, 0x1f, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x63, + 0x69, 0x64, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x2f, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_dof_messages_proto_rawDescOnce sync.Once + file_dof_messages_proto_rawDescData = file_dof_messages_proto_rawDesc +) + +func file_dof_messages_proto_rawDescGZIP() []byte { + file_dof_messages_proto_rawDescOnce.Do(func() { + file_dof_messages_proto_rawDescData = protoimpl.X.CompressGZIP(file_dof_messages_proto_rawDescData) + }) + return file_dof_messages_proto_rawDescData +} + +var file_dof_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_dof_messages_proto_goTypes = []interface{}{ + (*ClientInitialize)(nil), // 0: dof.ClientInitialize + (*ClientMessage)(nil), // 1: dof.ClientMessage + (*ServerMessage)(nil), // 2: dof.ServerMessage + (*PlayerEnter)(nil), // 3: dof.PlayerEnter + (*LevelResource)(nil), // 4: dof.LevelResource + (*GameStart)(nil), // 5: dof.GameStart + (*LevelPrepared)(nil), // 6: dof.LevelPrepared + (*LevalStart)(nil), // 7: dof.LevalStart + (*PointFound)(nil), // 8: dof.PointFound + (*LevelEnd)(nil), // 9: dof.LevelEnd + (*AllLevelEnd)(nil), // 10: dof.AllLevelEnd + (*GameScore)(nil), // 11: dof.GameScore + (*GameFinish)(nil), // 12: dof.GameFinish + (*PlayerLeave)(nil), // 13: dof.PlayerLeave +} +var file_dof_messages_proto_depIdxs = []int32{ + 3, // 0: dof.ClientMessage.player_enter:type_name -> dof.PlayerEnter + 6, // 1: dof.ClientMessage.level_prepared:type_name -> dof.LevelPrepared + 8, // 2: dof.ClientMessage.point_found:type_name -> dof.PointFound + 9, // 3: dof.ClientMessage.level_end:type_name -> dof.LevelEnd + 10, // 4: dof.ClientMessage.all_level_end:type_name -> dof.AllLevelEnd + 13, // 5: dof.ClientMessage.player_leave:type_name -> dof.PlayerLeave + 5, // 6: dof.ServerMessage.game_start:type_name -> dof.GameStart + 7, // 7: dof.ServerMessage.leval_start:type_name -> dof.LevalStart + 8, // 8: dof.ServerMessage.point_found:type_name -> dof.PointFound + 12, // 9: dof.ServerMessage.game_finish:type_name -> dof.GameFinish + 4, // 10: dof.GameStart.level_resource:type_name -> dof.LevelResource + 11, // 11: dof.GameFinish.scores:type_name -> dof.GameScore + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_dof_messages_proto_init() } +func file_dof_messages_proto_init() { + if File_dof_messages_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_dof_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientInitialize); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dof_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dof_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dof_messages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlayerEnter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dof_messages_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LevelResource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dof_messages_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GameStart); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dof_messages_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LevelPrepared); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dof_messages_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LevalStart); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dof_messages_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PointFound); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dof_messages_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LevelEnd); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dof_messages_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AllLevelEnd); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dof_messages_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GameScore); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dof_messages_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GameFinish); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dof_messages_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlayerLeave); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_dof_messages_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*ClientMessage_PlayerEnter)(nil), + (*ClientMessage_LevelPrepared)(nil), + (*ClientMessage_PointFound)(nil), + (*ClientMessage_LevelEnd)(nil), + (*ClientMessage_AllLevelEnd)(nil), + (*ClientMessage_PlayerLeave)(nil), + } + file_dof_messages_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*ServerMessage_GameStart)(nil), + (*ServerMessage_LevalStart)(nil), + (*ServerMessage_PointFound)(nil), + (*ServerMessage_GameFinish)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_dof_messages_proto_rawDesc, + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_dof_messages_proto_goTypes, + DependencyIndexes: file_dof_messages_proto_depIdxs, + MessageInfos: file_dof_messages_proto_msgTypes, + }.Build() + File_dof_messages_proto = out.File + file_dof_messages_proto_rawDesc = nil + file_dof_messages_proto_goTypes = nil + file_dof_messages_proto_depIdxs = nil +} diff --git a/dof/messages.pb.go b/dof/messages.pb.go deleted file mode 100644 index b2b7793..0000000 --- a/dof/messages.pb.go +++ /dev/null @@ -1,1225 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.19.1 -// source: messages.proto - -package pb - -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 ClientInitialize struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Cid int64 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *ClientInitialize) Reset() { - *x = ClientInitialize{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClientInitialize) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClientInitialize) ProtoMessage() {} - -func (x *ClientInitialize) ProtoReflect() protoreflect.Message { - mi := &file_messages_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 ClientInitialize.ProtoReflect.Descriptor instead. -func (*ClientInitialize) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{0} -} - -func (x *ClientInitialize) GetCid() int64 { - if x != nil { - return x.Cid - } - return 0 -} - -func (x *ClientInitialize) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type Memos struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Memos []*Memo `protobuf:"bytes,1,rep,name=memos,proto3" json:"memos,omitempty"` -} - -func (x *Memos) Reset() { - *x = Memos{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Memos) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Memos) ProtoMessage() {} - -func (x *Memos) ProtoReflect() protoreflect.Message { - mi := &file_messages_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 Memos.ProtoReflect.Descriptor instead. -func (*Memos) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{1} -} - -func (x *Memos) GetMemos() []*Memo { - if x != nil { - return x.Memos - } - return nil -} - -type Memo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Recipient: - // *Memo_To - // *Memo_EveryoneBut - // *Memo_Everyone - Recipient isMemo_Recipient `protobuf_oneof:"recipient"` - // Types that are assignable to Actual: - // *Memo_PlayerEnter - // *Memo_DownloadResource - // *Memo_LevelPrepared - // *Memo_GameStart - // *Memo_PointFound - // *Memo_LevelEnd - // *Memo_AllLevelEnd - // *Memo_ScoreSettlement - // *Memo_PlayerLeave - Actual isMemo_Actual `protobuf_oneof:"actual"` -} - -func (x *Memo) Reset() { - *x = Memo{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Memo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Memo) ProtoMessage() {} - -func (x *Memo) ProtoReflect() protoreflect.Message { - mi := &file_messages_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 Memo.ProtoReflect.Descriptor instead. -func (*Memo) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{2} -} - -func (m *Memo) GetRecipient() isMemo_Recipient { - if m != nil { - return m.Recipient - } - return nil -} - -func (x *Memo) GetTo() int64 { - if x, ok := x.GetRecipient().(*Memo_To); ok { - return x.To - } - return 0 -} - -func (x *Memo) GetEveryoneBut() int64 { - if x, ok := x.GetRecipient().(*Memo_EveryoneBut); ok { - return x.EveryoneBut - } - return 0 -} - -func (x *Memo) GetEveryone() bool { - if x, ok := x.GetRecipient().(*Memo_Everyone); ok { - return x.Everyone - } - return false -} - -func (m *Memo) GetActual() isMemo_Actual { - if m != nil { - return m.Actual - } - return nil -} - -func (x *Memo) GetPlayerEnter() *PlayerEnter { - if x, ok := x.GetActual().(*Memo_PlayerEnter); ok { - return x.PlayerEnter - } - return nil -} - -func (x *Memo) GetDownloadResource() *DownloadResource { - if x, ok := x.GetActual().(*Memo_DownloadResource); ok { - return x.DownloadResource - } - return nil -} - -func (x *Memo) GetLevelPrepared() *LevelPrepared { - if x, ok := x.GetActual().(*Memo_LevelPrepared); ok { - return x.LevelPrepared - } - return nil -} - -func (x *Memo) GetGameStart() *GameStart { - if x, ok := x.GetActual().(*Memo_GameStart); ok { - return x.GameStart - } - return nil -} - -func (x *Memo) GetPointFound() *PointFound { - if x, ok := x.GetActual().(*Memo_PointFound); ok { - return x.PointFound - } - return nil -} - -func (x *Memo) GetLevelEnd() *LevelEnd { - if x, ok := x.GetActual().(*Memo_LevelEnd); ok { - return x.LevelEnd - } - return nil -} - -func (x *Memo) GetAllLevelEnd() *AllLevelEnd { - if x, ok := x.GetActual().(*Memo_AllLevelEnd); ok { - return x.AllLevelEnd - } - return nil -} - -func (x *Memo) GetScoreSettlement() *ScoreSettlement { - if x, ok := x.GetActual().(*Memo_ScoreSettlement); ok { - return x.ScoreSettlement - } - return nil -} - -func (x *Memo) GetPlayerLeave() *PlayerLeave { - if x, ok := x.GetActual().(*Memo_PlayerLeave); ok { - return x.PlayerLeave - } - return nil -} - -type isMemo_Recipient interface { - isMemo_Recipient() -} - -type Memo_To struct { - To int64 `protobuf:"varint,1,opt,name=to,proto3,oneof"` -} - -type Memo_EveryoneBut struct { - EveryoneBut int64 `protobuf:"varint,2,opt,name=everyone_but,json=everyoneBut,proto3,oneof"` -} - -type Memo_Everyone struct { - Everyone bool `protobuf:"varint,3,opt,name=everyone,proto3,oneof"` -} - -func (*Memo_To) isMemo_Recipient() {} - -func (*Memo_EveryoneBut) isMemo_Recipient() {} - -func (*Memo_Everyone) isMemo_Recipient() {} - -type isMemo_Actual interface { - isMemo_Actual() -} - -type Memo_PlayerEnter struct { - PlayerEnter *PlayerEnter `protobuf:"bytes,10,opt,name=player_enter,json=playerEnter,proto3,oneof"` -} - -type Memo_DownloadResource struct { - DownloadResource *DownloadResource `protobuf:"bytes,11,opt,name=download_resource,json=downloadResource,proto3,oneof"` -} - -type Memo_LevelPrepared struct { - LevelPrepared *LevelPrepared `protobuf:"bytes,12,opt,name=level_prepared,json=levelPrepared,proto3,oneof"` -} - -type Memo_GameStart struct { - GameStart *GameStart `protobuf:"bytes,13,opt,name=game_start,json=gameStart,proto3,oneof"` -} - -type Memo_PointFound struct { - PointFound *PointFound `protobuf:"bytes,14,opt,name=point_found,json=pointFound,proto3,oneof"` -} - -type Memo_LevelEnd struct { - LevelEnd *LevelEnd `protobuf:"bytes,15,opt,name=level_end,json=levelEnd,proto3,oneof"` -} - -type Memo_AllLevelEnd struct { - AllLevelEnd *AllLevelEnd `protobuf:"bytes,16,opt,name=all_level_end,json=allLevelEnd,proto3,oneof"` -} - -type Memo_ScoreSettlement struct { - ScoreSettlement *ScoreSettlement `protobuf:"bytes,17,opt,name=score_settlement,json=scoreSettlement,proto3,oneof"` -} - -type Memo_PlayerLeave struct { - PlayerLeave *PlayerLeave `protobuf:"bytes,18,opt,name=player_leave,json=playerLeave,proto3,oneof"` -} - -func (*Memo_PlayerEnter) isMemo_Actual() {} - -func (*Memo_DownloadResource) isMemo_Actual() {} - -func (*Memo_LevelPrepared) isMemo_Actual() {} - -func (*Memo_GameStart) isMemo_Actual() {} - -func (*Memo_PointFound) isMemo_Actual() {} - -func (*Memo_LevelEnd) isMemo_Actual() {} - -func (*Memo_AllLevelEnd) isMemo_Actual() {} - -func (*Memo_ScoreSettlement) isMemo_Actual() {} - -func (*Memo_PlayerLeave) isMemo_Actual() {} - -// 客户端发送给服务器的消息 -type PlayerEnter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Cid int64 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid,omitempty"` - NickName string `protobuf:"bytes,2,opt,name=nick_name,json=nickName,proto3" json:"nick_name,omitempty"` - Country string `protobuf:"bytes,3,opt,name=country,proto3" json:"country,omitempty"` -} - -func (x *PlayerEnter) Reset() { - *x = PlayerEnter{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PlayerEnter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PlayerEnter) ProtoMessage() {} - -func (x *PlayerEnter) ProtoReflect() protoreflect.Message { - mi := &file_messages_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 PlayerEnter.ProtoReflect.Descriptor instead. -func (*PlayerEnter) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{3} -} - -func (x *PlayerEnter) GetCid() int64 { - if x != nil { - return x.Cid - } - return 0 -} - -func (x *PlayerEnter) GetNickName() string { - if x != nil { - return x.NickName - } - return "" -} - -func (x *PlayerEnter) GetCountry() string { - if x != nil { - return x.Country - } - return "" -} - -type LevelResource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Level string `protobuf:"bytes,1,opt,name=level,proto3" json:"level,omitempty"` -} - -func (x *LevelResource) Reset() { - *x = LevelResource{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LevelResource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LevelResource) ProtoMessage() {} - -func (x *LevelResource) ProtoReflect() protoreflect.Message { - mi := &file_messages_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 LevelResource.ProtoReflect.Descriptor instead. -func (*LevelResource) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{4} -} - -func (x *LevelResource) GetLevel() string { - if x != nil { - return x.Level - } - return "" -} - -type DownloadResource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - LevelResource []*LevelResource `protobuf:"bytes,1,rep,name=level_resource,json=levelResource,proto3" json:"level_resource,omitempty"` -} - -func (x *DownloadResource) Reset() { - *x = DownloadResource{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DownloadResource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DownloadResource) ProtoMessage() {} - -func (x *DownloadResource) ProtoReflect() protoreflect.Message { - mi := &file_messages_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 DownloadResource.ProtoReflect.Descriptor instead. -func (*DownloadResource) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{5} -} - -func (x *DownloadResource) GetLevelResource() []*LevelResource { - if x != nil { - return x.LevelResource - } - return nil -} - -type LevelPrepared struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Cid int64 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid,omitempty"` -} - -func (x *LevelPrepared) Reset() { - *x = LevelPrepared{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LevelPrepared) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LevelPrepared) ProtoMessage() {} - -func (x *LevelPrepared) ProtoReflect() protoreflect.Message { - mi := &file_messages_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 LevelPrepared.ProtoReflect.Descriptor instead. -func (*LevelPrepared) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{6} -} - -func (x *LevelPrepared) GetCid() int64 { - if x != nil { - return x.Cid - } - return 0 -} - -type GameStart struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Cid int64 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid,omitempty"` -} - -func (x *GameStart) Reset() { - *x = GameStart{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GameStart) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GameStart) ProtoMessage() {} - -func (x *GameStart) ProtoReflect() protoreflect.Message { - mi := &file_messages_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 GameStart.ProtoReflect.Descriptor instead. -func (*GameStart) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{7} -} - -func (x *GameStart) GetCid() int64 { - if x != nil { - return x.Cid - } - return 0 -} - -type PointFound struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Cid int64 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid,omitempty"` - PointId int64 `protobuf:"varint,2,opt,name=point_id,json=pointId,proto3" json:"point_id,omitempty"` - Level string `protobuf:"bytes,3,opt,name=level,proto3" json:"level,omitempty"` -} - -func (x *PointFound) Reset() { - *x = PointFound{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PointFound) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PointFound) ProtoMessage() {} - -func (x *PointFound) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[8] - 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 PointFound.ProtoReflect.Descriptor instead. -func (*PointFound) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{8} -} - -func (x *PointFound) GetCid() int64 { - if x != nil { - return x.Cid - } - return 0 -} - -func (x *PointFound) GetPointId() int64 { - if x != nil { - return x.PointId - } - return 0 -} - -func (x *PointFound) GetLevel() string { - if x != nil { - return x.Level - } - return "" -} - -type LevelEnd struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Cid int64 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid,omitempty"` - Level string `protobuf:"bytes,2,opt,name=level,proto3" json:"level,omitempty"` -} - -func (x *LevelEnd) Reset() { - *x = LevelEnd{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LevelEnd) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LevelEnd) ProtoMessage() {} - -func (x *LevelEnd) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[9] - 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 LevelEnd.ProtoReflect.Descriptor instead. -func (*LevelEnd) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{9} -} - -func (x *LevelEnd) GetCid() int64 { - if x != nil { - return x.Cid - } - return 0 -} - -func (x *LevelEnd) GetLevel() string { - if x != nil { - return x.Level - } - return "" -} - -type AllLevelEnd struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Cid int64 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid,omitempty"` -} - -func (x *AllLevelEnd) Reset() { - *x = AllLevelEnd{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AllLevelEnd) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AllLevelEnd) ProtoMessage() {} - -func (x *AllLevelEnd) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[10] - 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 AllLevelEnd.ProtoReflect.Descriptor instead. -func (*AllLevelEnd) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{10} -} - -func (x *AllLevelEnd) GetCid() int64 { - if x != nil { - return x.Cid - } - return 0 -} - -// 结算,翻译成英文是settlement -type ScoreSettlement struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Cid int64 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid,omitempty"` - Score int64 `protobuf:"varint,2,opt,name=score,proto3" json:"score,omitempty"` -} - -func (x *ScoreSettlement) Reset() { - *x = ScoreSettlement{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScoreSettlement) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScoreSettlement) ProtoMessage() {} - -func (x *ScoreSettlement) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[11] - 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 ScoreSettlement.ProtoReflect.Descriptor instead. -func (*ScoreSettlement) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{11} -} - -func (x *ScoreSettlement) GetCid() int64 { - if x != nil { - return x.Cid - } - return 0 -} - -func (x *ScoreSettlement) GetScore() int64 { - if x != nil { - return x.Score - } - return 0 -} - -type PlayerLeave struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Cid int64 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid,omitempty"` -} - -func (x *PlayerLeave) Reset() { - *x = PlayerLeave{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PlayerLeave) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PlayerLeave) ProtoMessage() {} - -func (x *PlayerLeave) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[12] - 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 PlayerLeave.ProtoReflect.Descriptor instead. -func (*PlayerLeave) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{12} -} - -func (x *PlayerLeave) GetCid() int64 { - if x != nil { - return x.Cid - } - return 0 -} - -var File_messages_proto protoreflect.FileDescriptor - -var file_messages_proto_rawDesc = []byte{ - 0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x07, 0x64, 0x6f, 0x66, 0x61, 0x67, 0x6f, 0x6e, 0x22, 0x36, 0x0a, 0x10, 0x43, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, - 0x64, 0x22, 0x2c, 0x0a, 0x05, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x23, 0x0a, 0x05, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x64, 0x6f, 0x66, 0x61, - 0x67, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x22, - 0x95, 0x05, 0x0a, 0x04, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x10, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x23, 0x0a, 0x0c, 0x65, 0x76, - 0x65, 0x72, 0x79, 0x6f, 0x6e, 0x65, 0x5f, 0x62, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x48, 0x00, 0x52, 0x0b, 0x65, 0x76, 0x65, 0x72, 0x79, 0x6f, 0x6e, 0x65, 0x42, 0x75, 0x74, 0x12, - 0x1c, 0x0a, 0x08, 0x65, 0x76, 0x65, 0x72, 0x79, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x48, 0x00, 0x52, 0x08, 0x65, 0x76, 0x65, 0x72, 0x79, 0x6f, 0x6e, 0x65, 0x12, 0x39, 0x0a, - 0x0c, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x6f, 0x66, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x48, 0x01, 0x52, 0x0b, 0x70, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x11, 0x64, 0x6f, 0x77, 0x6e, - 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x6f, 0x66, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x44, 0x6f, - 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x01, - 0x52, 0x10, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x3f, 0x0a, 0x0e, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x70, - 0x61, 0x72, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x6f, 0x66, - 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, - 0x65, 0x64, 0x48, 0x01, 0x52, 0x0d, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x50, 0x72, 0x65, 0x70, 0x61, - 0x72, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x0a, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x6f, 0x66, 0x61, 0x67, 0x6f, - 0x6e, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x48, 0x01, 0x52, 0x09, 0x67, - 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x64, 0x6f, 0x66, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x46, 0x6f, 0x75, - 0x6e, 0x64, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, - 0x12, 0x30, 0x0a, 0x09, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, 0x6f, 0x66, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x4c, 0x65, - 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x48, 0x01, 0x52, 0x08, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x45, - 0x6e, 0x64, 0x12, 0x3a, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x5f, - 0x65, 0x6e, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x6f, 0x66, 0x61, - 0x67, 0x6f, 0x6e, 0x2e, 0x41, 0x6c, 0x6c, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x48, - 0x01, 0x52, 0x0b, 0x61, 0x6c, 0x6c, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x12, 0x45, - 0x0a, 0x10, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x6f, 0x66, 0x61, 0x67, - 0x6f, 0x6e, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x48, 0x01, 0x52, 0x0f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x53, 0x65, 0x74, 0x74, 0x6c, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, - 0x6c, 0x65, 0x61, 0x76, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x6f, - 0x66, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, - 0x65, 0x48, 0x01, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, - 0x42, 0x0b, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x08, 0x0a, - 0x06, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x22, 0x56, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x69, 0x63, 0x6b, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, - 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, - 0x25, 0x0a, 0x0d, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x51, 0x0a, 0x10, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, - 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x0e, 0x6c, 0x65, - 0x76, 0x65, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x6f, 0x66, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0d, 0x6c, 0x65, 0x76, 0x65, - 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x0d, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0x1d, 0x0a, 0x09, - 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0x4f, 0x0a, 0x0a, 0x50, - 0x6f, 0x69, 0x6e, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x32, 0x0a, 0x08, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, - 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, - 0x22, 0x1f, 0x0a, 0x0b, 0x41, 0x6c, 0x6c, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x12, - 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x63, 0x69, - 0x64, 0x22, 0x39, 0x0a, 0x0f, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x1f, 0x0a, 0x0b, - 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x63, 0x69, 0x64, 0x42, 0x26, 0x5a, - 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x61, 0x73, 0x74, - 0x62, 0x6f, 0x78, 0x2f, 0x67, 0x75, 0x72, 0x75, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, - 0x6f, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_messages_proto_rawDescOnce sync.Once - file_messages_proto_rawDescData = file_messages_proto_rawDesc -) - -func file_messages_proto_rawDescGZIP() []byte { - file_messages_proto_rawDescOnce.Do(func() { - file_messages_proto_rawDescData = protoimpl.X.CompressGZIP(file_messages_proto_rawDescData) - }) - return file_messages_proto_rawDescData -} - -var file_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_messages_proto_goTypes = []interface{}{ - (*ClientInitialize)(nil), // 0: dofagon.ClientInitialize - (*Memos)(nil), // 1: dofagon.Memos - (*Memo)(nil), // 2: dofagon.Memo - (*PlayerEnter)(nil), // 3: dofagon.PlayerEnter - (*LevelResource)(nil), // 4: dofagon.LevelResource - (*DownloadResource)(nil), // 5: dofagon.DownloadResource - (*LevelPrepared)(nil), // 6: dofagon.LevelPrepared - (*GameStart)(nil), // 7: dofagon.GameStart - (*PointFound)(nil), // 8: dofagon.PointFound - (*LevelEnd)(nil), // 9: dofagon.LevelEnd - (*AllLevelEnd)(nil), // 10: dofagon.AllLevelEnd - (*ScoreSettlement)(nil), // 11: dofagon.ScoreSettlement - (*PlayerLeave)(nil), // 12: dofagon.PlayerLeave -} -var file_messages_proto_depIdxs = []int32{ - 2, // 0: dofagon.Memos.memos:type_name -> dofagon.Memo - 3, // 1: dofagon.Memo.player_enter:type_name -> dofagon.PlayerEnter - 5, // 2: dofagon.Memo.download_resource:type_name -> dofagon.DownloadResource - 6, // 3: dofagon.Memo.level_prepared:type_name -> dofagon.LevelPrepared - 7, // 4: dofagon.Memo.game_start:type_name -> dofagon.GameStart - 8, // 5: dofagon.Memo.point_found:type_name -> dofagon.PointFound - 9, // 6: dofagon.Memo.level_end:type_name -> dofagon.LevelEnd - 10, // 7: dofagon.Memo.all_level_end:type_name -> dofagon.AllLevelEnd - 11, // 8: dofagon.Memo.score_settlement:type_name -> dofagon.ScoreSettlement - 12, // 9: dofagon.Memo.player_leave:type_name -> dofagon.PlayerLeave - 4, // 10: dofagon.DownloadResource.level_resource:type_name -> dofagon.LevelResource - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name -} - -func init() { file_messages_proto_init() } -func file_messages_proto_init() { - if File_messages_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientInitialize); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Memos); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Memo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerEnter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LevelResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DownloadResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LevelPrepared); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GameStart); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PointFound); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LevelEnd); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AllLevelEnd); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScoreSettlement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerLeave); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_messages_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*Memo_To)(nil), - (*Memo_EveryoneBut)(nil), - (*Memo_Everyone)(nil), - (*Memo_PlayerEnter)(nil), - (*Memo_DownloadResource)(nil), - (*Memo_LevelPrepared)(nil), - (*Memo_GameStart)(nil), - (*Memo_PointFound)(nil), - (*Memo_LevelEnd)(nil), - (*Memo_AllLevelEnd)(nil), - (*Memo_ScoreSettlement)(nil), - (*Memo_PlayerLeave)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_messages_proto_rawDesc, - NumEnums: 0, - NumMessages: 13, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_messages_proto_goTypes, - DependencyIndexes: file_messages_proto_depIdxs, - MessageInfos: file_messages_proto_msgTypes, - }.Build() - File_messages_proto = out.File - file_messages_proto_rawDesc = nil - file_messages_proto_goTypes = nil - file_messages_proto_depIdxs = nil -} diff --git a/dof/messages.proto b/dof/messages.proto index 27d7913..b4ad96a 100644 --- a/dof/messages.proto +++ b/dof/messages.proto @@ -1,78 +1,62 @@ - -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - syntax = "proto3"; -package dofagon; -option go_package = "github.com/castbox/guru-proto/dof/pb"; +package dof; +option go_package = "./;pb"; +// ClientInitialize 服务端接收到 PlayerEnter 消息后发还给客户端的回执 message ClientInitialize { int64 cid = 1; - string uid = 2; } -message Memos { - repeated Memo memos = 1; -} - -message Memo { - oneof recipient { - int64 to = 1; - int64 everyone_but = 2; - bool everyone = 3; - } - +// ClientMessage 客户端发送给服务端的消息类型 +message ClientMessage { oneof actual { - PlayerEnter player_enter = 10; - DownloadResource download_resource = 11; - LevelPrepared level_prepared = 12; - GameStart game_start = 13; - PointFound point_found = 14; - LevelEnd level_end = 15; - AllLevelEnd all_level_end = 16; - ScoreSettlement score_settlement = 17; - PlayerLeave player_leave = 18; + PlayerEnter player_enter = 1; + LevelPrepared level_prepared = 2; + PointFound point_found = 3; + LevelEnd level_end = 4; + AllLevelEnd all_level_end = 5; + PlayerLeave player_leave = 6; } } -// 客户端发送给服务器的消息 +// ServerMessage 服务端发送给客户端的消息类型 +message ServerMessage { + oneof actual { + GameStart game_start = 1; + LevalStart leval_start = 2; + PointFound point_found = 3; + GameFinish game_finish = 4; + } +} + +// PlayerEnter 客户端进入房间 message PlayerEnter { - int64 cid = 1; - string nick_name = 2; - string country = 3; + string room_id = 1; + string uid = 2; + string nick_name = 3; + string country = 4; } message LevelResource { string level = 1; } -message DownloadResource { +message GameStart { repeated LevelResource level_resource = 1; } -message LevelPrepared { - int64 cid = 1; +message LevelPrepared { + int64 cid = 1; } -message GameStart { - int64 cid = 1; +message LevalStart { + string level = 1; } message PointFound { int64 cid = 1; - int64 point_id = 2; - string level = 3; + string level = 2; + int64 point_id = 3; } message LevelEnd { @@ -84,13 +68,15 @@ message AllLevelEnd { int64 cid = 1; } -// 结算,翻译成英文是settlement -message ScoreSettlement { - int64 cid = 1; +message GameScore { + string uid = 1; int64 score = 2; } +message GameFinish { + repeated GameScore scores = 1; +} message PlayerLeave { int64 cid = 1; -} \ No newline at end of file +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..c8e0d4b --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/guru-proto + +go 1.20 + +require google.golang.org/protobuf v1.31.0 // indirect diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..89f7f22 --- /dev/null +++ b/go.sum @@ -0,0 +1,6 @@ +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=