Documentation ¶
Index ¶
- Variables
- type BroadCast
- func (*BroadCast) Descriptor() ([]byte, []int)deprecated
- func (x *BroadCast) GetActionData() int32
- func (x *BroadCast) GetContent() string
- func (m *BroadCast) GetData() isBroadCast_Data
- func (x *BroadCast) GetP() *Position
- func (x *BroadCast) GetPid() int32
- func (x *BroadCast) GetTp() int32
- func (*BroadCast) ProtoMessage()
- func (x *BroadCast) ProtoReflect() protoreflect.Message
- func (x *BroadCast) Reset()
- func (x *BroadCast) String() string
- type BroadCast_ActionData
- type BroadCast_Content
- type BroadCast_P
- type Player
- type Position
- func (*Position) Descriptor() ([]byte, []int)deprecated
- func (x *Position) GetV() float32
- func (x *Position) GetX() float32
- func (x *Position) GetY() float32
- func (x *Position) GetZ() float32
- func (*Position) ProtoMessage()
- func (x *Position) ProtoReflect() protoreflect.Message
- func (x *Position) Reset()
- func (x *Position) String() string
- type SyncPid
- type SyncPlayers
- type Talk
Constants ¶
This section is empty.
Variables ¶
View Source
var File_pb_msg_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type BroadCast ¶
type BroadCast struct { Pid int32 `protobuf:"varint,1,opt,name=Pid,proto3" json:"Pid,omitempty"` Tp int32 `protobuf:"varint,2,opt,name=Tp,proto3" json:"Tp,omitempty"` // 1-聊天, 2-位置坐标, 3-动作, 4-移动之后坐标信息更新 // Types that are assignable to Data: // *BroadCast_Content // *BroadCast_P // *BroadCast_ActionData Data isBroadCast_Data `protobuf_oneof:"Data"` // contains filtered or unexported fields }
广播玩家数据
func (*BroadCast) Descriptor
deprecated
func (*BroadCast) GetActionData ¶
func (*BroadCast) GetContent ¶
func (*BroadCast) ProtoMessage ¶
func (*BroadCast) ProtoMessage()
func (*BroadCast) ProtoReflect ¶
func (x *BroadCast) ProtoReflect() protoreflect.Message
type BroadCast_ActionData ¶
type BroadCast_ActionData struct {
ActionData int32 `protobuf:"varint,5,opt,name=ActionData,proto3,oneof"` // 玩家动作
}
type BroadCast_Content ¶
type BroadCast_Content struct {
Content string `protobuf:"bytes,3,opt,name=Content,proto3,oneof"` // 聊天信息
}
type BroadCast_P ¶
type BroadCast_P struct {
P *Position `protobuf:"bytes,4,opt,name=P,proto3,oneof"` // 玩家位置坐标
}
type Player ¶
type Player struct { Pid int32 `protobuf:"varint,1,opt,name=Pid,proto3" json:"Pid,omitempty"` P *Position `protobuf:"bytes,2,opt,name=P,proto3" json:"P,omitempty"` // contains filtered or unexported fields }
玩家信息
func (*Player) Descriptor
deprecated
func (*Player) ProtoMessage ¶
func (*Player) ProtoMessage()
func (*Player) ProtoReflect ¶
func (x *Player) ProtoReflect() protoreflect.Message
type Position ¶
type Position struct { X float32 `protobuf:"fixed32,1,opt,name=X,proto3" json:"X,omitempty"` Y float32 `protobuf:"fixed32,2,opt,name=Y,proto3" json:"Y,omitempty"` Z float32 `protobuf:"fixed32,3,opt,name=Z,proto3" json:"Z,omitempty"` V float32 `protobuf:"fixed32,4,opt,name=V,proto3" json:"V,omitempty"` // contains filtered or unexported fields }
玩家位置
func (*Position) Descriptor
deprecated
func (*Position) ProtoMessage ¶
func (*Position) ProtoMessage()
func (*Position) ProtoReflect ¶
func (x *Position) ProtoReflect() protoreflect.Message
type SyncPid ¶
type SyncPid struct { Pid int32 `protobuf:"varint,1,opt,name=Pid,proto3" json:"Pid,omitempty"` // 服务端生成新玩家ID // contains filtered or unexported fields }
同步客户端玩家ID
func (*SyncPid) Descriptor
deprecated
func (*SyncPid) ProtoMessage ¶
func (*SyncPid) ProtoMessage()
func (*SyncPid) ProtoReflect ¶
func (x *SyncPid) ProtoReflect() protoreflect.Message
type SyncPlayers ¶
type SyncPlayers struct { Ps []*Player `protobuf:"bytes,1,rep,name=ps,proto3" json:"ps,omitempty"` // contains filtered or unexported fields }
同步周围玩家信息到客户端
func (*SyncPlayers) Descriptor
deprecated
func (*SyncPlayers) Descriptor() ([]byte, []int)
Deprecated: Use SyncPlayers.ProtoReflect.Descriptor instead.
func (*SyncPlayers) GetPs ¶
func (x *SyncPlayers) GetPs() []*Player
func (*SyncPlayers) ProtoMessage ¶
func (*SyncPlayers) ProtoMessage()
func (*SyncPlayers) ProtoReflect ¶
func (x *SyncPlayers) ProtoReflect() protoreflect.Message
func (*SyncPlayers) Reset ¶
func (x *SyncPlayers) Reset()
func (*SyncPlayers) String ¶
func (x *SyncPlayers) String() string
type Talk ¶
type Talk struct { Content string `protobuf:"bytes,1,opt,name=Content,proto3" json:"Content,omitempty"` //聊天内容 // contains filtered or unexported fields }
玩家聊天数据
func (*Talk) Descriptor
deprecated
func (*Talk) GetContent ¶
func (*Talk) ProtoMessage ¶
func (*Talk) ProtoMessage()
func (*Talk) ProtoReflect ¶
func (x *Talk) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.