Documentation ¶
Index ¶
- Variables
- type C2S_ConnectMsg
- func (*C2S_ConnectMsg) Descriptor() ([]byte, []int)deprecated
- func (x *C2S_ConnectMsg) GetBattleID() uint64
- func (x *C2S_ConnectMsg) GetPlayerID() uint64
- func (x *C2S_ConnectMsg) GetToken() string
- func (*C2S_ConnectMsg) ProtoMessage()
- func (x *C2S_ConnectMsg) ProtoReflect() protoreflect.Message
- func (x *C2S_ConnectMsg) Reset()
- func (x *C2S_ConnectMsg) String() string
- type C2S_InputMsg
- func (*C2S_InputMsg) Descriptor() ([]byte, []int)deprecated
- func (x *C2S_InputMsg) GetFrameID() uint32
- func (x *C2S_InputMsg) GetSid() int32
- func (x *C2S_InputMsg) GetX() int32
- func (x *C2S_InputMsg) GetY() int32
- func (*C2S_InputMsg) ProtoMessage()
- func (x *C2S_InputMsg) ProtoReflect() protoreflect.Message
- func (x *C2S_InputMsg) Reset()
- func (x *C2S_InputMsg) String() string
- type C2S_ProgressMsg
- type C2S_ResultMsg
- type ERRORCODE
- func (ERRORCODE) Descriptor() protoreflect.EnumDescriptor
- func (x ERRORCODE) Enum() *ERRORCODE
- func (ERRORCODE) EnumDescriptor() ([]byte, []int)deprecated
- func (x ERRORCODE) Number() protoreflect.EnumNumber
- func (x ERRORCODE) String() string
- func (ERRORCODE) Type() protoreflect.EnumType
- func (x *ERRORCODE) UnmarshalJSON(b []byte) errordeprecated
- type FrameData
- type ID
- type InputData
- func (*InputData) Descriptor() ([]byte, []int)deprecated
- func (x *InputData) GetId() uint64
- func (x *InputData) GetRoomseatid() int32
- func (x *InputData) GetSid() int32
- func (x *InputData) GetX() int32
- func (x *InputData) GetY() int32
- func (*InputData) ProtoMessage()
- func (x *InputData) ProtoReflect() protoreflect.Message
- func (x *InputData) Reset()
- func (x *InputData) String() string
- type S2C_ConnectMsg
- type S2C_FrameMsg
- type S2C_JoinRoomMsg
- func (*S2C_JoinRoomMsg) Descriptor() ([]byte, []int)deprecated
- func (x *S2C_JoinRoomMsg) GetOthers() []uint64
- func (x *S2C_JoinRoomMsg) GetPros() []int32
- func (x *S2C_JoinRoomMsg) GetRandomSeed() int32
- func (x *S2C_JoinRoomMsg) GetRoomseatid() int32
- func (*S2C_JoinRoomMsg) ProtoMessage()
- func (x *S2C_JoinRoomMsg) ProtoReflect() protoreflect.Message
- func (x *S2C_JoinRoomMsg) Reset()
- func (x *S2C_JoinRoomMsg) String() string
- type S2C_ProgressMsg
- func (*S2C_ProgressMsg) Descriptor() ([]byte, []int)deprecated
- func (x *S2C_ProgressMsg) GetId() uint64
- func (x *S2C_ProgressMsg) GetPro() int32
- func (*S2C_ProgressMsg) ProtoMessage()
- func (x *S2C_ProgressMsg) ProtoReflect() protoreflect.Message
- func (x *S2C_ProgressMsg) Reset()
- func (x *S2C_ProgressMsg) String() string
- type S2C_StartMsg
Constants ¶
This section is empty.
Variables ¶
var ( ID_name = map[int32]string{ 0: "MSG_BEGIN", 1: "MSG_Connect", 2: "MSG_Heartbeat", 10: "MSG_JoinRoom", 20: "MSG_Progress", 30: "MSG_Ready", 40: "MSG_Start", 50: "MSG_Frame", 60: "MSG_Input", 70: "MSG_Result", 100: "MSG_Close", 255: "MSG_END", } ID_value = map[string]int32{ "MSG_BEGIN": 0, "MSG_Connect": 1, "MSG_Heartbeat": 2, "MSG_JoinRoom": 10, "MSG_Progress": 20, "MSG_Ready": 30, "MSG_Start": 40, "MSG_Frame": 50, "MSG_Input": 60, "MSG_Result": 70, "MSG_Close": 100, "MSG_END": 255, } )
Enum value maps for ID.
var ( ERRORCODE_name = map[int32]string{ 0: "ERR_Ok", 1: "ERR_NoPlayer", 2: "ERR_NoRoom", 3: "ERR_RoomState", 4: "ERR_Token", } ERRORCODE_value = map[string]int32{ "ERR_Ok": 0, "ERR_NoPlayer": 1, "ERR_NoRoom": 2, "ERR_RoomState": 3, "ERR_Token": 4, } )
Enum value maps for ERRORCODE.
var File_message_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type C2S_ConnectMsg ¶
type C2S_ConnectMsg struct { PlayerID *uint64 `protobuf:"varint,1,opt,name=playerID" json:"playerID,omitempty"` //唯一ID BattleID *uint64 `protobuf:"varint,2,opt,name=battleID" json:"battleID,omitempty"` //战斗ID Token *string `protobuf:"bytes,10,opt,name=token" json:"token,omitempty"` //令牌 // contains filtered or unexported fields }
客户端发来的第一个消息
func (*C2S_ConnectMsg) Descriptor
deprecated
func (*C2S_ConnectMsg) Descriptor() ([]byte, []int)
Deprecated: Use C2S_ConnectMsg.ProtoReflect.Descriptor instead.
func (*C2S_ConnectMsg) GetBattleID ¶
func (x *C2S_ConnectMsg) GetBattleID() uint64
func (*C2S_ConnectMsg) GetPlayerID ¶
func (x *C2S_ConnectMsg) GetPlayerID() uint64
func (*C2S_ConnectMsg) GetToken ¶
func (x *C2S_ConnectMsg) GetToken() string
func (*C2S_ConnectMsg) ProtoMessage ¶
func (*C2S_ConnectMsg) ProtoMessage()
func (*C2S_ConnectMsg) ProtoReflect ¶
func (x *C2S_ConnectMsg) ProtoReflect() protoreflect.Message
func (*C2S_ConnectMsg) Reset ¶
func (x *C2S_ConnectMsg) Reset()
func (*C2S_ConnectMsg) String ¶
func (x *C2S_ConnectMsg) String() string
type C2S_InputMsg ¶
type C2S_InputMsg struct { Sid *int32 `protobuf:"varint,1,opt,name=sid" json:"sid,omitempty"` //操作id X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` //操作位置x Y *int32 `protobuf:"varint,3,opt,name=y" json:"y,omitempty"` //操作位置y FrameID *uint32 `protobuf:"varint,4,opt,name=frameID" json:"frameID,omitempty"` //帧ID // contains filtered or unexported fields }
操作输入消息
func (*C2S_InputMsg) Descriptor
deprecated
func (*C2S_InputMsg) Descriptor() ([]byte, []int)
Deprecated: Use C2S_InputMsg.ProtoReflect.Descriptor instead.
func (*C2S_InputMsg) GetFrameID ¶
func (x *C2S_InputMsg) GetFrameID() uint32
func (*C2S_InputMsg) GetSid ¶
func (x *C2S_InputMsg) GetSid() int32
func (*C2S_InputMsg) GetX ¶
func (x *C2S_InputMsg) GetX() int32
func (*C2S_InputMsg) GetY ¶
func (x *C2S_InputMsg) GetY() int32
func (*C2S_InputMsg) ProtoMessage ¶
func (*C2S_InputMsg) ProtoMessage()
func (*C2S_InputMsg) ProtoReflect ¶
func (x *C2S_InputMsg) ProtoReflect() protoreflect.Message
func (*C2S_InputMsg) Reset ¶
func (x *C2S_InputMsg) Reset()
func (*C2S_InputMsg) String ¶
func (x *C2S_InputMsg) String() string
type C2S_ProgressMsg ¶
type C2S_ProgressMsg struct { Pro *int32 `protobuf:"varint,1,opt,name=pro" json:"pro,omitempty"` //进度值0~100 // contains filtered or unexported fields }
读条进度
func (*C2S_ProgressMsg) Descriptor
deprecated
func (*C2S_ProgressMsg) Descriptor() ([]byte, []int)
Deprecated: Use C2S_ProgressMsg.ProtoReflect.Descriptor instead.
func (*C2S_ProgressMsg) GetPro ¶
func (x *C2S_ProgressMsg) GetPro() int32
func (*C2S_ProgressMsg) ProtoMessage ¶
func (*C2S_ProgressMsg) ProtoMessage()
func (*C2S_ProgressMsg) ProtoReflect ¶
func (x *C2S_ProgressMsg) ProtoReflect() protoreflect.Message
func (*C2S_ProgressMsg) Reset ¶
func (x *C2S_ProgressMsg) Reset()
func (*C2S_ProgressMsg) String ¶
func (x *C2S_ProgressMsg) String() string
type C2S_ResultMsg ¶
type C2S_ResultMsg struct { WinnerID *uint64 `protobuf:"varint,1,opt,name=winnerID" json:"winnerID,omitempty"` //胜利者ID // contains filtered or unexported fields }
结果消息
func (*C2S_ResultMsg) Descriptor
deprecated
func (*C2S_ResultMsg) Descriptor() ([]byte, []int)
Deprecated: Use C2S_ResultMsg.ProtoReflect.Descriptor instead.
func (*C2S_ResultMsg) GetWinnerID ¶
func (x *C2S_ResultMsg) GetWinnerID() uint64
func (*C2S_ResultMsg) ProtoMessage ¶
func (*C2S_ResultMsg) ProtoMessage()
func (*C2S_ResultMsg) ProtoReflect ¶
func (x *C2S_ResultMsg) ProtoReflect() protoreflect.Message
func (*C2S_ResultMsg) Reset ¶
func (x *C2S_ResultMsg) Reset()
func (*C2S_ResultMsg) String ¶
func (x *C2S_ResultMsg) String() string
type ERRORCODE ¶
type ERRORCODE int32
错误码
func (ERRORCODE) Descriptor ¶
func (ERRORCODE) Descriptor() protoreflect.EnumDescriptor
func (ERRORCODE) EnumDescriptor
deprecated
func (ERRORCODE) Number ¶
func (x ERRORCODE) Number() protoreflect.EnumNumber
func (ERRORCODE) Type ¶
func (ERRORCODE) Type() protoreflect.EnumType
func (*ERRORCODE) UnmarshalJSON
deprecated
type FrameData ¶
type FrameData struct { FrameID *uint32 `protobuf:"varint,1,opt,name=frameID" json:"frameID,omitempty"` //帧ID Input []*InputData `protobuf:"bytes,2,rep,name=input" json:"input,omitempty"` //操作输入 // contains filtered or unexported fields }
帧数据
func (*FrameData) Descriptor
deprecated
func (*FrameData) GetFrameID ¶
func (*FrameData) ProtoMessage ¶
func (*FrameData) ProtoMessage()
func (*FrameData) ProtoReflect ¶
func (x *FrameData) ProtoReflect() protoreflect.Message
type ID ¶
type ID int32
消息ID
const ( ID_MSG_BEGIN ID = 0 ID_MSG_Connect ID = 1 //连接(客户端发来第一个消息) ID_MSG_Heartbeat ID = 2 //心跳(服务端返回Connect成功之后每隔1秒发送一个心跳包) ID_MSG_JoinRoom ID = 10 //进入 ID_MSG_Progress ID = 20 //进度 ID_MSG_Ready ID = 30 //准备 ID_MSG_Start ID = 40 //开始 ID_MSG_Frame ID = 50 //帧数据 ID_MSG_Input ID = 60 //输入 ID_MSG_Result ID = 70 //结果 ID_MSG_Close ID = 100 //房间关闭 ID_MSG_END ID = 255 )
func (ID) Descriptor ¶
func (ID) Descriptor() protoreflect.EnumDescriptor
func (ID) EnumDescriptor
deprecated
func (ID) Number ¶
func (x ID) Number() protoreflect.EnumNumber
func (ID) Type ¶
func (ID) Type() protoreflect.EnumType
func (*ID) UnmarshalJSON
deprecated
type InputData ¶
type InputData struct { Id *uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` //id Sid *int32 `protobuf:"varint,2,opt,name=sid" json:"sid,omitempty"` //操作id X *int32 `protobuf:"varint,3,opt,name=x" json:"x,omitempty"` //操作位置x Y *int32 `protobuf:"varint,4,opt,name=y" json:"y,omitempty"` //操作位置y Roomseatid *int32 `protobuf:"varint,5,opt,name=roomseatid" json:"roomseatid,omitempty"` //操作者的位置索引id(1~N) // contains filtered or unexported fields }
帧存储操作输入
func (*InputData) Descriptor
deprecated
func (*InputData) GetRoomseatid ¶
func (*InputData) ProtoMessage ¶
func (*InputData) ProtoMessage()
func (*InputData) ProtoReflect ¶
func (x *InputData) ProtoReflect() protoreflect.Message
type S2C_ConnectMsg ¶
type S2C_ConnectMsg struct { ErrorCode *ERRORCODE `protobuf:"varint,1,opt,name=errorCode,enum=pb.ERRORCODE" json:"errorCode,omitempty"` //错误码 // contains filtered or unexported fields }
服务端返回连接结果
func (*S2C_ConnectMsg) Descriptor
deprecated
func (*S2C_ConnectMsg) Descriptor() ([]byte, []int)
Deprecated: Use S2C_ConnectMsg.ProtoReflect.Descriptor instead.
func (*S2C_ConnectMsg) GetErrorCode ¶
func (x *S2C_ConnectMsg) GetErrorCode() ERRORCODE
func (*S2C_ConnectMsg) ProtoMessage ¶
func (*S2C_ConnectMsg) ProtoMessage()
func (*S2C_ConnectMsg) ProtoReflect ¶
func (x *S2C_ConnectMsg) ProtoReflect() protoreflect.Message
func (*S2C_ConnectMsg) Reset ¶
func (x *S2C_ConnectMsg) Reset()
func (*S2C_ConnectMsg) String ¶
func (x *S2C_ConnectMsg) String() string
type S2C_FrameMsg ¶
type S2C_FrameMsg struct { Frames []*FrameData `protobuf:"bytes,1,rep,name=frames" json:"frames,omitempty"` //帧数据 // contains filtered or unexported fields }
广播帧消息
func (*S2C_FrameMsg) Descriptor
deprecated
func (*S2C_FrameMsg) Descriptor() ([]byte, []int)
Deprecated: Use S2C_FrameMsg.ProtoReflect.Descriptor instead.
func (*S2C_FrameMsg) GetFrames ¶
func (x *S2C_FrameMsg) GetFrames() []*FrameData
func (*S2C_FrameMsg) ProtoMessage ¶
func (*S2C_FrameMsg) ProtoMessage()
func (*S2C_FrameMsg) ProtoReflect ¶
func (x *S2C_FrameMsg) ProtoReflect() protoreflect.Message
func (*S2C_FrameMsg) Reset ¶
func (x *S2C_FrameMsg) Reset()
func (*S2C_FrameMsg) String ¶
func (x *S2C_FrameMsg) String() string
type S2C_JoinRoomMsg ¶
type S2C_JoinRoomMsg struct { Roomseatid *int32 `protobuf:"varint,1,opt,name=roomseatid" json:"roomseatid,omitempty"` //自己的位置索引id(1~N) Others []uint64 `protobuf:"varint,2,rep,name=others" json:"others,omitempty"` //其他人的id Pros []int32 `protobuf:"varint,3,rep,name=pros" json:"pros,omitempty"` //其他人的进度 RandomSeed *int32 `protobuf:"varint,4,opt,name=randomSeed" json:"randomSeed,omitempty"` //随机种子 // contains filtered or unexported fields }
服务端返回进入房间消息
func (*S2C_JoinRoomMsg) Descriptor
deprecated
func (*S2C_JoinRoomMsg) Descriptor() ([]byte, []int)
Deprecated: Use S2C_JoinRoomMsg.ProtoReflect.Descriptor instead.
func (*S2C_JoinRoomMsg) GetOthers ¶
func (x *S2C_JoinRoomMsg) GetOthers() []uint64
func (*S2C_JoinRoomMsg) GetPros ¶
func (x *S2C_JoinRoomMsg) GetPros() []int32
func (*S2C_JoinRoomMsg) GetRandomSeed ¶
func (x *S2C_JoinRoomMsg) GetRandomSeed() int32
func (*S2C_JoinRoomMsg) GetRoomseatid ¶
func (x *S2C_JoinRoomMsg) GetRoomseatid() int32
func (*S2C_JoinRoomMsg) ProtoMessage ¶
func (*S2C_JoinRoomMsg) ProtoMessage()
func (*S2C_JoinRoomMsg) ProtoReflect ¶
func (x *S2C_JoinRoomMsg) ProtoReflect() protoreflect.Message
func (*S2C_JoinRoomMsg) Reset ¶
func (x *S2C_JoinRoomMsg) Reset()
func (*S2C_JoinRoomMsg) String ¶
func (x *S2C_JoinRoomMsg) String() string
type S2C_ProgressMsg ¶
type S2C_ProgressMsg struct { Id *uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` //id Pro *int32 `protobuf:"varint,2,opt,name=pro" json:"pro,omitempty"` //进度值0~100 // contains filtered or unexported fields }
读条进度
func (*S2C_ProgressMsg) Descriptor
deprecated
func (*S2C_ProgressMsg) Descriptor() ([]byte, []int)
Deprecated: Use S2C_ProgressMsg.ProtoReflect.Descriptor instead.
func (*S2C_ProgressMsg) GetId ¶
func (x *S2C_ProgressMsg) GetId() uint64
func (*S2C_ProgressMsg) GetPro ¶
func (x *S2C_ProgressMsg) GetPro() int32
func (*S2C_ProgressMsg) ProtoMessage ¶
func (*S2C_ProgressMsg) ProtoMessage()
func (*S2C_ProgressMsg) ProtoReflect ¶
func (x *S2C_ProgressMsg) ProtoReflect() protoreflect.Message
func (*S2C_ProgressMsg) Reset ¶
func (x *S2C_ProgressMsg) Reset()
func (*S2C_ProgressMsg) String ¶
func (x *S2C_ProgressMsg) String() string
type S2C_StartMsg ¶
type S2C_StartMsg struct { TimeStamp *int64 `protobuf:"varint,1,opt,name=timeStamp" json:"timeStamp,omitempty"` //同步时间戳 // contains filtered or unexported fields }
服务端广播开始游戏消息
func (*S2C_StartMsg) Descriptor
deprecated
func (*S2C_StartMsg) Descriptor() ([]byte, []int)
Deprecated: Use S2C_StartMsg.ProtoReflect.Descriptor instead.
func (*S2C_StartMsg) GetTimeStamp ¶
func (x *S2C_StartMsg) GetTimeStamp() int64
func (*S2C_StartMsg) ProtoMessage ¶
func (*S2C_StartMsg) ProtoMessage()
func (*S2C_StartMsg) ProtoReflect ¶
func (x *S2C_StartMsg) ProtoReflect() protoreflect.Message
func (*S2C_StartMsg) Reset ¶
func (x *S2C_StartMsg) Reset()
func (*S2C_StartMsg) String ¶
func (x *S2C_StartMsg) String() string