Documentation ¶
Index ¶
- Variables
- type DiscardCardToc
- func (*DiscardCardToc) Descriptor() ([]byte, []int)deprecated
- func (x *DiscardCardToc) GetCard() *UnoCard
- func (x *DiscardCardToc) GetPlayerId() uint32
- func (x *DiscardCardToc) GetWantColor() uint32
- func (*DiscardCardToc) ProtoMessage()
- func (x *DiscardCardToc) ProtoReflect() protoreflect.Message
- func (x *DiscardCardToc) Reset()
- func (x *DiscardCardToc) String() string
- type DiscardCardTos
- func (*DiscardCardTos) Descriptor() ([]byte, []int)deprecated
- func (x *DiscardCardTos) GetCardId() uint32
- func (x *DiscardCardTos) GetWantColor() uint32
- func (*DiscardCardTos) ProtoMessage()
- func (x *DiscardCardTos) ProtoReflect() protoreflect.Message
- func (x *DiscardCardTos) Reset()
- func (x *DiscardCardTos) String() string
- type DrawCardToc
- type InitToc
- type NotifyTurnToc
- func (*NotifyTurnToc) Descriptor() ([]byte, []int)deprecated
- func (x *NotifyTurnToc) GetDir() bool
- func (x *NotifyTurnToc) GetPlayerId() uint32
- func (*NotifyTurnToc) ProtoMessage()
- func (x *NotifyTurnToc) ProtoReflect() protoreflect.Message
- func (x *NotifyTurnToc) Reset()
- func (x *NotifyTurnToc) String() string
- type NotifyWinToc
- type OtherAddHandCardToc
- func (*OtherAddHandCardToc) Descriptor() ([]byte, []int)deprecated
- func (x *OtherAddHandCardToc) GetNum() uint32
- func (x *OtherAddHandCardToc) GetPlayerId() uint32
- func (*OtherAddHandCardToc) ProtoMessage()
- func (x *OtherAddHandCardToc) ProtoReflect() protoreflect.Message
- func (x *OtherAddHandCardToc) Reset()
- func (x *OtherAddHandCardToc) String() string
- type RestartGameTos
- type SetDeckNumToc
- type UnoCard
- func (*UnoCard) Descriptor() ([]byte, []int)deprecated
- func (x *UnoCard) GetCardId() uint32
- func (x *UnoCard) GetColor() uint32
- func (x *UnoCard) GetNum() uint32
- func (*UnoCard) ProtoMessage()
- func (x *UnoCard) ProtoReflect() protoreflect.Message
- func (x *UnoCard) Reset()
- func (x *UnoCard) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_uno_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type DiscardCardToc ¶
type DiscardCardToc struct { PlayerId uint32 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` // 玩家ID 你是0 你的下家是1 下下家是2 以此类推 Card *UnoCard `protobuf:"bytes,2,opt,name=card,proto3" json:"card,omitempty"` WantColor uint32 `protobuf:"varint,3,opt,name=want_color,json=wantColor,proto3" json:"want_color,omitempty"` // 出黑牌时,选择想要的颜色 // contains filtered or unexported fields }
通知客户端:某玩家出牌(自己出牌后,服务端也会返回这个协议)
func (*DiscardCardToc) Descriptor
deprecated
func (*DiscardCardToc) Descriptor() ([]byte, []int)
Deprecated: Use DiscardCardToc.ProtoReflect.Descriptor instead.
func (*DiscardCardToc) GetCard ¶
func (x *DiscardCardToc) GetCard() *UnoCard
func (*DiscardCardToc) GetPlayerId ¶
func (x *DiscardCardToc) GetPlayerId() uint32
func (*DiscardCardToc) GetWantColor ¶
func (x *DiscardCardToc) GetWantColor() uint32
func (*DiscardCardToc) ProtoMessage ¶
func (*DiscardCardToc) ProtoMessage()
func (*DiscardCardToc) ProtoReflect ¶
func (x *DiscardCardToc) ProtoReflect() protoreflect.Message
func (*DiscardCardToc) Reset ¶
func (x *DiscardCardToc) Reset()
func (*DiscardCardToc) String ¶
func (x *DiscardCardToc) String() string
type DiscardCardTos ¶
type DiscardCardTos struct { CardId uint32 `protobuf:"varint,1,opt,name=card_id,json=cardId,proto3" json:"card_id,omitempty"` // 出的牌的ID WantColor uint32 `protobuf:"varint,2,opt,name=want_color,json=wantColor,proto3" json:"want_color,omitempty"` // 出黑牌时,选择想要的颜色 // contains filtered or unexported fields }
出牌
func (*DiscardCardTos) Descriptor
deprecated
func (*DiscardCardTos) Descriptor() ([]byte, []int)
Deprecated: Use DiscardCardTos.ProtoReflect.Descriptor instead.
func (*DiscardCardTos) GetCardId ¶
func (x *DiscardCardTos) GetCardId() uint32
func (*DiscardCardTos) GetWantColor ¶
func (x *DiscardCardTos) GetWantColor() uint32
func (*DiscardCardTos) ProtoMessage ¶
func (*DiscardCardTos) ProtoMessage()
func (*DiscardCardTos) ProtoReflect ¶
func (x *DiscardCardTos) ProtoReflect() protoreflect.Message
func (*DiscardCardTos) Reset ¶
func (x *DiscardCardTos) Reset()
func (*DiscardCardTos) String ¶
func (x *DiscardCardTos) String() string
type DrawCardToc ¶
type DrawCardToc struct { Card []*UnoCard `protobuf:"bytes,1,rep,name=card,proto3" json:"card,omitempty"` // contains filtered or unexported fields }
通知客户端:你摸牌
func (*DrawCardToc) Descriptor
deprecated
func (*DrawCardToc) Descriptor() ([]byte, []int)
Deprecated: Use DrawCardToc.ProtoReflect.Descriptor instead.
func (*DrawCardToc) GetCard ¶
func (x *DrawCardToc) GetCard() []*UnoCard
func (*DrawCardToc) ProtoMessage ¶
func (*DrawCardToc) ProtoMessage()
func (*DrawCardToc) ProtoReflect ¶
func (x *DrawCardToc) ProtoReflect() protoreflect.Message
func (*DrawCardToc) Reset ¶
func (x *DrawCardToc) Reset()
func (*DrawCardToc) String ¶
func (x *DrawCardToc) String() string
type InitToc ¶
type InitToc struct { PlayerNum uint32 `protobuf:"varint,1,opt,name=player_num,json=playerNum,proto3" json:"player_num,omitempty"` // 玩家总人数(包括你) // contains filtered or unexported fields }
通知客户端:初始化游戏
func (*InitToc) Descriptor
deprecated
func (*InitToc) GetPlayerNum ¶
func (*InitToc) ProtoMessage ¶
func (*InitToc) ProtoMessage()
func (*InitToc) ProtoReflect ¶
func (x *InitToc) ProtoReflect() protoreflect.Message
type NotifyTurnToc ¶
type NotifyTurnToc struct { PlayerId uint32 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` // 玩家ID 你是0 你的下家是1 下下家是2 以此类推 Dir bool `protobuf:"varint,2,opt,name=dir,proto3" json:"dir,omitempty"` // true-顺时针 false-逆时针 // contains filtered or unexported fields }
通知客户端:现在到谁的回合了
func (*NotifyTurnToc) Descriptor
deprecated
func (*NotifyTurnToc) Descriptor() ([]byte, []int)
Deprecated: Use NotifyTurnToc.ProtoReflect.Descriptor instead.
func (*NotifyTurnToc) GetDir ¶
func (x *NotifyTurnToc) GetDir() bool
func (*NotifyTurnToc) GetPlayerId ¶
func (x *NotifyTurnToc) GetPlayerId() uint32
func (*NotifyTurnToc) ProtoMessage ¶
func (*NotifyTurnToc) ProtoMessage()
func (*NotifyTurnToc) ProtoReflect ¶
func (x *NotifyTurnToc) ProtoReflect() protoreflect.Message
func (*NotifyTurnToc) Reset ¶
func (x *NotifyTurnToc) Reset()
func (*NotifyTurnToc) String ¶
func (x *NotifyTurnToc) String() string
type NotifyWinToc ¶
type NotifyWinToc struct { PlayerId uint32 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` // 玩家ID 你是0 你的下家是1 下下家是2 以此类推 // contains filtered or unexported fields }
通知客户端谁赢了
func (*NotifyWinToc) Descriptor
deprecated
func (*NotifyWinToc) Descriptor() ([]byte, []int)
Deprecated: Use NotifyWinToc.ProtoReflect.Descriptor instead.
func (*NotifyWinToc) GetPlayerId ¶
func (x *NotifyWinToc) GetPlayerId() uint32
func (*NotifyWinToc) ProtoMessage ¶
func (*NotifyWinToc) ProtoMessage()
func (*NotifyWinToc) ProtoReflect ¶
func (x *NotifyWinToc) ProtoReflect() protoreflect.Message
func (*NotifyWinToc) Reset ¶
func (x *NotifyWinToc) Reset()
func (*NotifyWinToc) String ¶
func (x *NotifyWinToc) String() string
type OtherAddHandCardToc ¶
type OtherAddHandCardToc struct { PlayerId uint32 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` // 玩家ID 你的下家是1 下下家是2 以此类推 Num uint32 `protobuf:"varint,2,opt,name=num,proto3" json:"num,omitempty"` // 增加的手牌数量 // contains filtered or unexported fields }
通知客户端:其他玩家摸牌
func (*OtherAddHandCardToc) Descriptor
deprecated
func (*OtherAddHandCardToc) Descriptor() ([]byte, []int)
Deprecated: Use OtherAddHandCardToc.ProtoReflect.Descriptor instead.
func (*OtherAddHandCardToc) GetNum ¶
func (x *OtherAddHandCardToc) GetNum() uint32
func (*OtherAddHandCardToc) GetPlayerId ¶
func (x *OtherAddHandCardToc) GetPlayerId() uint32
func (*OtherAddHandCardToc) ProtoMessage ¶
func (*OtherAddHandCardToc) ProtoMessage()
func (*OtherAddHandCardToc) ProtoReflect ¶
func (x *OtherAddHandCardToc) ProtoReflect() protoreflect.Message
func (*OtherAddHandCardToc) Reset ¶
func (x *OtherAddHandCardToc) Reset()
func (*OtherAddHandCardToc) String ¶
func (x *OtherAddHandCardToc) String() string
type RestartGameTos ¶
type RestartGameTos struct {
// contains filtered or unexported fields
}
重开
func (*RestartGameTos) Descriptor
deprecated
func (*RestartGameTos) Descriptor() ([]byte, []int)
Deprecated: Use RestartGameTos.ProtoReflect.Descriptor instead.
func (*RestartGameTos) ProtoMessage ¶
func (*RestartGameTos) ProtoMessage()
func (*RestartGameTos) ProtoReflect ¶
func (x *RestartGameTos) ProtoReflect() protoreflect.Message
func (*RestartGameTos) Reset ¶
func (x *RestartGameTos) Reset()
func (*RestartGameTos) String ¶
func (x *RestartGameTos) String() string
type SetDeckNumToc ¶
type SetDeckNumToc struct { Num uint32 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"` // contains filtered or unexported fields }
通知客户端:牌堆剩余数量(如果变多了,说明洗牌了)
func (*SetDeckNumToc) Descriptor
deprecated
func (*SetDeckNumToc) Descriptor() ([]byte, []int)
Deprecated: Use SetDeckNumToc.ProtoReflect.Descriptor instead.
func (*SetDeckNumToc) GetNum ¶
func (x *SetDeckNumToc) GetNum() uint32
func (*SetDeckNumToc) ProtoMessage ¶
func (*SetDeckNumToc) ProtoMessage()
func (*SetDeckNumToc) ProtoReflect ¶
func (x *SetDeckNumToc) ProtoReflect() protoreflect.Message
func (*SetDeckNumToc) Reset ¶
func (x *SetDeckNumToc) Reset()
func (*SetDeckNumToc) String ¶
func (x *SetDeckNumToc) String() string
type UnoCard ¶
type UnoCard struct { CardId uint32 `protobuf:"varint,1,opt,name=card_id,json=cardId,proto3" json:"card_id,omitempty"` // 卡牌ID Color uint32 `protobuf:"varint,2,opt,name=color,proto3" json:"color,omitempty"` // 1、2、3、4代表四种颜色,你爱用哪个用哪个,等价的。0代表黑牌 Num uint32 `protobuf:"varint,3,opt,name=num,proto3" json:"num,omitempty"` // 0-9是数字牌 10代表“跳过”牌 11代表“反向”牌 12代表“+2牌” 13代表黑牌中的变色牌 14代表黑牌中的“+4”牌 // contains filtered or unexported fields }
卡牌的结构体
func (*UnoCard) Descriptor
deprecated
func (*UnoCard) ProtoMessage ¶
func (*UnoCard) ProtoMessage()
func (*UnoCard) ProtoReflect ¶
func (x *UnoCard) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.