pb

package
v0.0.0-...-5b63d95 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

Deprecated: Use BroadCast.ProtoReflect.Descriptor instead.

func (*BroadCast) GetActionData

func (x *BroadCast) GetActionData() int32

func (*BroadCast) GetContent

func (x *BroadCast) GetContent() string

func (*BroadCast) GetData

func (m *BroadCast) GetData() isBroadCast_Data

func (*BroadCast) GetP

func (x *BroadCast) GetP() *Position

func (*BroadCast) GetPid

func (x *BroadCast) GetPid() int32

func (*BroadCast) GetTp

func (x *BroadCast) GetTp() int32

func (*BroadCast) ProtoMessage

func (*BroadCast) ProtoMessage()

func (*BroadCast) ProtoReflect

func (x *BroadCast) ProtoReflect() protoreflect.Message

func (*BroadCast) Reset

func (x *BroadCast) Reset()

func (*BroadCast) String

func (x *BroadCast) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Player.ProtoReflect.Descriptor instead.

func (*Player) GetP

func (x *Player) GetP() *Position

func (*Player) GetPid

func (x *Player) GetPid() int32

func (*Player) ProtoMessage

func (*Player) ProtoMessage()

func (*Player) ProtoReflect

func (x *Player) ProtoReflect() protoreflect.Message

func (*Player) Reset

func (x *Player) Reset()

func (*Player) String

func (x *Player) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Position.ProtoReflect.Descriptor instead.

func (*Position) GetV

func (x *Position) GetV() float32

func (*Position) GetX

func (x *Position) GetX() float32

func (*Position) GetY

func (x *Position) GetY() float32

func (*Position) GetZ

func (x *Position) GetZ() float32

func (*Position) ProtoMessage

func (*Position) ProtoMessage()

func (*Position) ProtoReflect

func (x *Position) ProtoReflect() protoreflect.Message

func (*Position) Reset

func (x *Position) Reset()

func (*Position) String

func (x *Position) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use SyncPid.ProtoReflect.Descriptor instead.

func (*SyncPid) GetPid

func (x *SyncPid) GetPid() int32

func (*SyncPid) ProtoMessage

func (*SyncPid) ProtoMessage()

func (*SyncPid) ProtoReflect

func (x *SyncPid) ProtoReflect() protoreflect.Message

func (*SyncPid) Reset

func (x *SyncPid) Reset()

func (*SyncPid) String

func (x *SyncPid) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Talk.ProtoReflect.Descriptor instead.

func (*Talk) GetContent

func (x *Talk) GetContent() string

func (*Talk) ProtoMessage

func (*Talk) ProtoMessage()

func (*Talk) ProtoReflect

func (x *Talk) ProtoReflect() protoreflect.Message

func (*Talk) Reset

func (x *Talk) Reset()

func (*Talk) String

func (x *Talk) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL