Documentation ¶
Index ¶
- Variables
- func Byte(mes *PbMessage) []byte
- func MakeFightData(frameId int, fightMessage []*FightMessage) []byte
- func MakeFightEnd() []byte
- func MakeFightStartCmd() []byte
- func MakeJoinMatch() []byte
- func MakeLogin() []byte
- func MakeQuitMatch() []byte
- func MakeRoomConfirm() []byte
- func MakeRoomDismiss() []byte
- func MakeRoomLoadCmd(roomSelectData []int) []byte
- func MakeRoomLoadData(loadPercent int32) []byte
- func MakeRoomSelect() []byte
- type AccountData
- type FightMessage
- func (*FightMessage) Descriptor() ([]byte, []int)deprecated
- func (x *FightMessage) GetBattleCMD() FightMessage_BattleCMD
- func (x *FightMessage) GetEndPos() int32
- func (x *FightMessage) GetEnemyUnit() int32
- func (x *FightMessage) GetInteractObject() int32
- func (x *FightMessage) GetSelectedUnit() []int32
- func (x *FightMessage) GetStartPos() int32
- func (*FightMessage) ProtoMessage()
- func (x *FightMessage) ProtoReflect() protoreflect.Message
- func (x *FightMessage) Reset()
- func (x *FightMessage) String() string
- type FightMessage_BattleCMD
- func (FightMessage_BattleCMD) Descriptor() protoreflect.EnumDescriptor
- func (x FightMessage_BattleCMD) Enum() *FightMessage_BattleCMD
- func (FightMessage_BattleCMD) EnumDescriptor() ([]byte, []int)deprecated
- func (x FightMessage_BattleCMD) Number() protoreflect.EnumNumber
- func (x FightMessage_BattleCMD) String() string
- func (FightMessage_BattleCMD) Type() protoreflect.EnumType
- type PbMessage
- func (*PbMessage) Descriptor() ([]byte, []int)deprecated
- func (x *PbMessage) GetChatMes() string
- func (x *PbMessage) GetCmd() PbMessage_CMD
- func (x *PbMessage) GetCmdMatch() PbMessage_CmdMatch
- func (x *PbMessage) GetCmdRoom() PbMessage_CmdRoom
- func (x *PbMessage) GetFightMessage() []*FightMessage
- func (x *PbMessage) GetFrameId() int32
- func (x *PbMessage) GetLoadPercent() int32
- func (x *PbMessage) GetName() string
- func (x *PbMessage) GetRoomIndex() int32
- func (x *PbMessage) GetRoomLoadPercent() []int32
- func (x *PbMessage) GetRoomSelectData() []*SelectData
- func (x *PbMessage) GetSelectData() *SelectData
- func (x *PbMessage) GetSendFightMessage() *FightMessage
- func (*PbMessage) ProtoMessage()
- func (x *PbMessage) ProtoReflect() protoreflect.Message
- func (x *PbMessage) Reset()
- func (x *PbMessage) String() string
- type PbMessage_CMD
- func (PbMessage_CMD) Descriptor() protoreflect.EnumDescriptor
- func (x PbMessage_CMD) Enum() *PbMessage_CMD
- func (PbMessage_CMD) EnumDescriptor() ([]byte, []int)deprecated
- func (x PbMessage_CMD) Number() protoreflect.EnumNumber
- func (x PbMessage_CMD) String() string
- func (PbMessage_CMD) Type() protoreflect.EnumType
- type PbMessage_CmdMatch
- func (PbMessage_CmdMatch) Descriptor() protoreflect.EnumDescriptor
- func (x PbMessage_CmdMatch) Enum() *PbMessage_CmdMatch
- func (PbMessage_CmdMatch) EnumDescriptor() ([]byte, []int)deprecated
- func (x PbMessage_CmdMatch) Number() protoreflect.EnumNumber
- func (x PbMessage_CmdMatch) String() string
- func (PbMessage_CmdMatch) Type() protoreflect.EnumType
- type PbMessage_CmdRoom
- func (PbMessage_CmdRoom) Descriptor() protoreflect.EnumDescriptor
- func (x PbMessage_CmdRoom) Enum() *PbMessage_CmdRoom
- func (PbMessage_CmdRoom) EnumDescriptor() ([]byte, []int)deprecated
- func (x PbMessage_CmdRoom) Number() protoreflect.EnumNumber
- func (x PbMessage_CmdRoom) String() string
- func (PbMessage_CmdRoom) Type() protoreflect.EnumType
- type SelectData
- func (*SelectData) Descriptor() ([]byte, []int)deprecated
- func (x *SelectData) GetChatMes() string
- func (x *SelectData) GetFaction() int32
- func (x *SelectData) GetIsReady() bool
- func (x *SelectData) GetPlayerName() string
- func (*SelectData) ProtoMessage()
- func (x *SelectData) ProtoReflect() protoreflect.Message
- func (x *SelectData) Reset()
- func (x *SelectData) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PbMessage_CMD_name = map[int32]string{ 0: "login", 1: "match", 2: "room", 3: "fight", 4: "chat", 5: "fightEnd", } PbMessage_CMD_value = map[string]int32{ "login": 0, "match": 1, "room": 2, "fight": 3, "chat": 4, "fightEnd": 5, } )
Enum value maps for PbMessage_CMD.
View Source
var ( PbMessage_CmdMatch_name = map[int32]string{ 0: "joinMatch", 1: "quitMatch", } PbMessage_CmdMatch_value = map[string]int32{ "joinMatch": 0, "quitMatch": 1, } )
Enum value maps for PbMessage_CmdMatch.
View Source
var ( PbMessage_CmdRoom_name = map[int32]string{ 0: "confirm", 1: "select", 2: "selectDate", 3: "load", 4: "loadData", 5: "fightStart", 6: "fightOp", 7: "dismissed", } PbMessage_CmdRoom_value = map[string]int32{ "confirm": 0, "select": 1, "selectDate": 2, "load": 3, "loadData": 4, "fightStart": 5, "fightOp": 6, "dismissed": 7, } )
Enum value maps for PbMessage_CmdRoom.
View Source
var ( FightMessage_BattleCMD_name = map[int32]string{ 0: "move", 1: "fight", 2: "interact", } FightMessage_BattleCMD_value = map[string]int32{ "move": 0, "fight": 1, "interact": 2, } )
Enum value maps for FightMessage_BattleCMD.
View Source
var File_Protobuf_proto protoreflect.FileDescriptor
Functions ¶
func MakeFightData ¶
func MakeFightData(frameId int, fightMessage []*FightMessage) []byte
func MakeFightEnd ¶
func MakeFightEnd() []byte
func MakeFightStartCmd ¶
func MakeFightStartCmd() []byte
func MakeJoinMatch ¶
func MakeJoinMatch() []byte
func MakeQuitMatch ¶
func MakeQuitMatch() []byte
func MakeRoomConfirm ¶
func MakeRoomConfirm() []byte
func MakeRoomDismiss ¶
func MakeRoomDismiss() []byte
func MakeRoomLoadCmd ¶
func MakeRoomLoadData ¶
func MakeRoomSelect ¶
func MakeRoomSelect() []byte
Types ¶
type AccountData ¶
type AccountData struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*AccountData) Descriptor
deprecated
func (*AccountData) Descriptor() ([]byte, []int)
Deprecated: Use AccountData.ProtoReflect.Descriptor instead.
func (*AccountData) GetName ¶
func (x *AccountData) GetName() string
func (*AccountData) ProtoMessage ¶
func (*AccountData) ProtoMessage()
func (*AccountData) ProtoReflect ¶
func (x *AccountData) ProtoReflect() protoreflect.Message
func (*AccountData) Reset ¶
func (x *AccountData) Reset()
func (*AccountData) String ¶
func (x *AccountData) String() string
type FightMessage ¶
type FightMessage struct { BattleCMD FightMessage_BattleCMD `protobuf:"varint,1,opt,name=battleCMD,proto3,enum=pb.FightMessage_BattleCMD" json:"battleCMD,omitempty"` SelectedUnit []int32 `protobuf:"varint,3,rep,packed,name=selectedUnit,proto3" json:"selectedUnit,omitempty"` // move StartPos int32 `protobuf:"varint,4,opt,name=startPos,proto3" json:"startPos,omitempty"` EndPos int32 `protobuf:"varint,5,opt,name=endPos,proto3" json:"endPos,omitempty"` //fight EnemyUnit int32 `protobuf:"varint,6,opt,name=enemyUnit,proto3" json:"enemyUnit,omitempty"` //interact InteractObject int32 `protobuf:"varint,7,opt,name=interactObject,proto3" json:"interactObject,omitempty"` // contains filtered or unexported fields }
func (*FightMessage) Descriptor
deprecated
func (*FightMessage) Descriptor() ([]byte, []int)
Deprecated: Use FightMessage.ProtoReflect.Descriptor instead.
func (*FightMessage) GetBattleCMD ¶
func (x *FightMessage) GetBattleCMD() FightMessage_BattleCMD
func (*FightMessage) GetEndPos ¶
func (x *FightMessage) GetEndPos() int32
func (*FightMessage) GetEnemyUnit ¶
func (x *FightMessage) GetEnemyUnit() int32
func (*FightMessage) GetInteractObject ¶
func (x *FightMessage) GetInteractObject() int32
func (*FightMessage) GetSelectedUnit ¶
func (x *FightMessage) GetSelectedUnit() []int32
func (*FightMessage) GetStartPos ¶
func (x *FightMessage) GetStartPos() int32
func (*FightMessage) ProtoMessage ¶
func (*FightMessage) ProtoMessage()
func (*FightMessage) ProtoReflect ¶
func (x *FightMessage) ProtoReflect() protoreflect.Message
func (*FightMessage) Reset ¶
func (x *FightMessage) Reset()
func (*FightMessage) String ¶
func (x *FightMessage) String() string
type FightMessage_BattleCMD ¶
type FightMessage_BattleCMD int32
const ( FightMessage_move FightMessage_BattleCMD = 0 FightMessage_fight FightMessage_BattleCMD = 1 FightMessage_interact FightMessage_BattleCMD = 2 )
func (FightMessage_BattleCMD) Descriptor ¶
func (FightMessage_BattleCMD) Descriptor() protoreflect.EnumDescriptor
func (FightMessage_BattleCMD) Enum ¶
func (x FightMessage_BattleCMD) Enum() *FightMessage_BattleCMD
func (FightMessage_BattleCMD) EnumDescriptor
deprecated
func (FightMessage_BattleCMD) EnumDescriptor() ([]byte, []int)
Deprecated: Use FightMessage_BattleCMD.Descriptor instead.
func (FightMessage_BattleCMD) Number ¶
func (x FightMessage_BattleCMD) Number() protoreflect.EnumNumber
func (FightMessage_BattleCMD) String ¶
func (x FightMessage_BattleCMD) String() string
func (FightMessage_BattleCMD) Type ¶
func (FightMessage_BattleCMD) Type() protoreflect.EnumType
type PbMessage ¶
type PbMessage struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Cmd PbMessage_CMD `protobuf:"varint,2,opt,name=cmd,proto3,enum=pb.PbMessage_CMD" json:"cmd,omitempty"` CmdMatch PbMessage_CmdMatch `protobuf:"varint,3,opt,name=cmdMatch,proto3,enum=pb.PbMessage_CmdMatch" json:"cmdMatch,omitempty"` CmdRoom PbMessage_CmdRoom `protobuf:"varint,4,opt,name=cmdRoom,proto3,enum=pb.PbMessage_CmdRoom" json:"cmdRoom,omitempty"` RoomIndex int32 `protobuf:"varint,5,opt,name=roomIndex,proto3" json:"roomIndex,omitempty"` ChatMes string `protobuf:"bytes,6,opt,name=chatMes,proto3" json:"chatMes,omitempty"` SelectData *SelectData `protobuf:"bytes,7,opt,name=selectData,proto3" json:"selectData,omitempty"` RoomSelectData []*SelectData `protobuf:"bytes,8,rep,name=roomSelectData,proto3" json:"roomSelectData,omitempty"` LoadPercent int32 `protobuf:"varint,9,opt,name=loadPercent,proto3" json:"loadPercent,omitempty"` RoomLoadPercent []int32 `protobuf:"varint,10,rep,packed,name=roomLoadPercent,proto3" json:"roomLoadPercent,omitempty"` FrameId int32 `protobuf:"varint,11,opt,name=frameId,proto3" json:"frameId,omitempty"` SendFightMessage *FightMessage `protobuf:"bytes,12,opt,name=sendFightMessage,proto3" json:"sendFightMessage,omitempty"` FightMessage []*FightMessage `protobuf:"bytes,13,rep,name=fightMessage,proto3" json:"fightMessage,omitempty"` // contains filtered or unexported fields }
func (*PbMessage) Descriptor
deprecated
func (*PbMessage) GetChatMes ¶
func (*PbMessage) GetCmd ¶
func (x *PbMessage) GetCmd() PbMessage_CMD
func (*PbMessage) GetCmdMatch ¶
func (x *PbMessage) GetCmdMatch() PbMessage_CmdMatch
func (*PbMessage) GetCmdRoom ¶
func (x *PbMessage) GetCmdRoom() PbMessage_CmdRoom
func (*PbMessage) GetFightMessage ¶
func (x *PbMessage) GetFightMessage() []*FightMessage
func (*PbMessage) GetFrameId ¶
func (*PbMessage) GetLoadPercent ¶
func (*PbMessage) GetRoomIndex ¶
func (*PbMessage) GetRoomLoadPercent ¶
func (*PbMessage) GetRoomSelectData ¶
func (x *PbMessage) GetRoomSelectData() []*SelectData
func (*PbMessage) GetSelectData ¶
func (x *PbMessage) GetSelectData() *SelectData
func (*PbMessage) GetSendFightMessage ¶
func (x *PbMessage) GetSendFightMessage() *FightMessage
func (*PbMessage) ProtoMessage ¶
func (*PbMessage) ProtoMessage()
func (*PbMessage) ProtoReflect ¶
func (x *PbMessage) ProtoReflect() protoreflect.Message
type PbMessage_CMD ¶
type PbMessage_CMD int32
const ( PbMessage_login PbMessage_CMD = 0 PbMessage_match PbMessage_CMD = 1 PbMessage_room PbMessage_CMD = 2 // 这个fight只是服务器发客户端 PbMessage_fight PbMessage_CMD = 3 PbMessage_chat PbMessage_CMD = 4 PbMessage_fightEnd PbMessage_CMD = 5 )
func (PbMessage_CMD) Descriptor ¶
func (PbMessage_CMD) Descriptor() protoreflect.EnumDescriptor
func (PbMessage_CMD) Enum ¶
func (x PbMessage_CMD) Enum() *PbMessage_CMD
func (PbMessage_CMD) EnumDescriptor
deprecated
func (PbMessage_CMD) EnumDescriptor() ([]byte, []int)
Deprecated: Use PbMessage_CMD.Descriptor instead.
func (PbMessage_CMD) Number ¶
func (x PbMessage_CMD) Number() protoreflect.EnumNumber
func (PbMessage_CMD) String ¶
func (x PbMessage_CMD) String() string
func (PbMessage_CMD) Type ¶
func (PbMessage_CMD) Type() protoreflect.EnumType
type PbMessage_CmdMatch ¶
type PbMessage_CmdMatch int32
const ( PbMessage_joinMatch PbMessage_CmdMatch = 0 PbMessage_quitMatch PbMessage_CmdMatch = 1 )
func (PbMessage_CmdMatch) Descriptor ¶
func (PbMessage_CmdMatch) Descriptor() protoreflect.EnumDescriptor
func (PbMessage_CmdMatch) Enum ¶
func (x PbMessage_CmdMatch) Enum() *PbMessage_CmdMatch
func (PbMessage_CmdMatch) EnumDescriptor
deprecated
func (PbMessage_CmdMatch) EnumDescriptor() ([]byte, []int)
Deprecated: Use PbMessage_CmdMatch.Descriptor instead.
func (PbMessage_CmdMatch) Number ¶
func (x PbMessage_CmdMatch) Number() protoreflect.EnumNumber
func (PbMessage_CmdMatch) String ¶
func (x PbMessage_CmdMatch) String() string
func (PbMessage_CmdMatch) Type ¶
func (PbMessage_CmdMatch) Type() protoreflect.EnumType
type PbMessage_CmdRoom ¶
type PbMessage_CmdRoom int32
const ( PbMessage_confirm PbMessage_CmdRoom = 0 PbMessage_select PbMessage_CmdRoom = 1 PbMessage_selectDate PbMessage_CmdRoom = 2 PbMessage_load PbMessage_CmdRoom = 3 PbMessage_loadData PbMessage_CmdRoom = 4 PbMessage_fightStart PbMessage_CmdRoom = 5 //这个fightop只是客户端发服务器 PbMessage_fightOp PbMessage_CmdRoom = 6 PbMessage_dismissed PbMessage_CmdRoom = 7 )
func (PbMessage_CmdRoom) Descriptor ¶
func (PbMessage_CmdRoom) Descriptor() protoreflect.EnumDescriptor
func (PbMessage_CmdRoom) Enum ¶
func (x PbMessage_CmdRoom) Enum() *PbMessage_CmdRoom
func (PbMessage_CmdRoom) EnumDescriptor
deprecated
func (PbMessage_CmdRoom) EnumDescriptor() ([]byte, []int)
Deprecated: Use PbMessage_CmdRoom.Descriptor instead.
func (PbMessage_CmdRoom) Number ¶
func (x PbMessage_CmdRoom) Number() protoreflect.EnumNumber
func (PbMessage_CmdRoom) String ¶
func (x PbMessage_CmdRoom) String() string
func (PbMessage_CmdRoom) Type ¶
func (PbMessage_CmdRoom) Type() protoreflect.EnumType
type SelectData ¶
type SelectData struct { PlayerName string `protobuf:"bytes,2,opt,name=playerName,proto3" json:"playerName,omitempty"` ChatMes string `protobuf:"bytes,3,opt,name=chatMes,proto3" json:"chatMes,omitempty"` Faction int32 `protobuf:"varint,6,opt,name=faction,proto3" json:"faction,omitempty"` IsReady bool `protobuf:"varint,7,opt,name=isReady,proto3" json:"isReady,omitempty"` // contains filtered or unexported fields }
func (*SelectData) Descriptor
deprecated
func (*SelectData) Descriptor() ([]byte, []int)
Deprecated: Use SelectData.ProtoReflect.Descriptor instead.
func (*SelectData) GetChatMes ¶
func (x *SelectData) GetChatMes() string
func (*SelectData) GetFaction ¶
func (x *SelectData) GetFaction() int32
func (*SelectData) GetIsReady ¶
func (x *SelectData) GetIsReady() bool
func (*SelectData) GetPlayerName ¶
func (x *SelectData) GetPlayerName() string
func (*SelectData) ProtoMessage ¶
func (*SelectData) ProtoMessage()
func (*SelectData) ProtoReflect ¶
func (x *SelectData) ProtoReflect() protoreflect.Message
func (*SelectData) Reset ¶
func (x *SelectData) Reset()
func (*SelectData) String ¶
func (x *SelectData) String() string
Click to show internal directories.
Click to hide internal directories.