actions

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Action_ActionType_name = map[int32]string{
		0: "MOVE",
		1: "CHAT",
		2: "DISCONNECT",
		3: "LOGIN",
		4: "REGISTER",
	}
	Action_ActionType_value = map[string]int32{
		"MOVE":       0,
		"CHAT":       1,
		"DISCONNECT": 2,
		"LOGIN":      3,
		"REGISTER":   4,
	}
)

Enum value maps for Action_ActionType.

View Source
var File_actions_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Action

type Action struct {
	Type        Action_ActionType `protobuf:"varint,1,opt,name=type,proto3,enum=actions.Action_ActionType" json:"type,omitempty"`
	X           int32             `protobuf:"varint,2,opt,name=x,proto3" json:"x,omitempty"`
	Y           int32             `protobuf:"varint,3,opt,name=y,proto3" json:"y,omitempty"`
	PlayerId    int32             `protobuf:"varint,4,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"`
	ChatMessage string            `protobuf:"bytes,5,opt,name=chat_message,json=chatMessage,proto3" json:"chat_message,omitempty"`
	Username    string            `protobuf:"bytes,6,opt,name=username,proto3" json:"username,omitempty"`
	Password    string            `protobuf:"bytes,7,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*Action) Descriptor deprecated

func (*Action) Descriptor() ([]byte, []int)

Deprecated: Use Action.ProtoReflect.Descriptor instead.

func (*Action) GetChatMessage

func (x *Action) GetChatMessage() string

func (*Action) GetPassword

func (x *Action) GetPassword() string

func (*Action) GetPlayerId

func (x *Action) GetPlayerId() int32

func (*Action) GetType

func (x *Action) GetType() Action_ActionType

func (*Action) GetUsername

func (x *Action) GetUsername() string

func (*Action) GetX

func (x *Action) GetX() int32

func (*Action) GetY

func (x *Action) GetY() int32

func (*Action) ProtoMessage

func (*Action) ProtoMessage()

func (*Action) ProtoReflect

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

func (*Action) Reset

func (x *Action) Reset()

func (*Action) String

func (x *Action) String() string

type ActionBatch

type ActionBatch struct {
	PlayerId        int32     `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"`
	Actions         []*Action `protobuf:"bytes,2,rep,name=actions,proto3" json:"actions,omitempty"`
	Tick            int64     `protobuf:"varint,3,opt,name=tick,proto3" json:"tick,omitempty"`
	ProtocolVersion int32     `protobuf:"varint,4,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
	// contains filtered or unexported fields
}

func (*ActionBatch) Descriptor deprecated

func (*ActionBatch) Descriptor() ([]byte, []int)

Deprecated: Use ActionBatch.ProtoReflect.Descriptor instead.

func (*ActionBatch) GetActions

func (x *ActionBatch) GetActions() []*Action

func (*ActionBatch) GetPlayerId

func (x *ActionBatch) GetPlayerId() int32

func (*ActionBatch) GetProtocolVersion

func (x *ActionBatch) GetProtocolVersion() int32

func (*ActionBatch) GetTick

func (x *ActionBatch) GetTick() int64

func (*ActionBatch) ProtoMessage

func (*ActionBatch) ProtoMessage()

func (*ActionBatch) ProtoReflect

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

func (*ActionBatch) Reset

func (x *ActionBatch) Reset()

func (*ActionBatch) String

func (x *ActionBatch) String() string

type Action_ActionType

type Action_ActionType int32
const (
	Action_MOVE       Action_ActionType = 0
	Action_CHAT       Action_ActionType = 1
	Action_DISCONNECT Action_ActionType = 2
	Action_LOGIN      Action_ActionType = 3
	Action_REGISTER   Action_ActionType = 4
)

func (Action_ActionType) Descriptor

func (Action_ActionType) Enum

func (Action_ActionType) EnumDescriptor deprecated

func (Action_ActionType) EnumDescriptor() ([]byte, []int)

Deprecated: Use Action_ActionType.Descriptor instead.

func (Action_ActionType) Number

func (Action_ActionType) String

func (x Action_ActionType) String() string

func (Action_ActionType) Type

type ChatMessage

type ChatMessage struct {
	PlayerId  int32  `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"`
	Username  string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Content   string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	Timestamp int64  `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatMessage) Descriptor deprecated

func (*ChatMessage) Descriptor() ([]byte, []int)

Deprecated: Use ChatMessage.ProtoReflect.Descriptor instead.

func (*ChatMessage) GetContent

func (x *ChatMessage) GetContent() string

func (*ChatMessage) GetPlayerId

func (x *ChatMessage) GetPlayerId() int32

func (*ChatMessage) GetTimestamp

func (x *ChatMessage) GetTimestamp() int64

func (*ChatMessage) GetUsername

func (x *ChatMessage) GetUsername() string

func (*ChatMessage) ProtoMessage

func (*ChatMessage) ProtoMessage()

func (*ChatMessage) ProtoReflect

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

func (*ChatMessage) Reset

func (x *ChatMessage) Reset()

func (*ChatMessage) String

func (x *ChatMessage) String() string

type PlayerState

type PlayerState struct {
	PlayerId int32  `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"`
	X        int32  `protobuf:"varint,2,opt,name=x,proto3" json:"x,omitempty"`
	Y        int32  `protobuf:"varint,3,opt,name=y,proto3" json:"y,omitempty"`
	Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*PlayerState) Descriptor deprecated

func (*PlayerState) Descriptor() ([]byte, []int)

Deprecated: Use PlayerState.ProtoReflect.Descriptor instead.

func (*PlayerState) GetPlayerId

func (x *PlayerState) GetPlayerId() int32

func (*PlayerState) GetUsername

func (x *PlayerState) GetUsername() string

func (*PlayerState) GetX

func (x *PlayerState) GetX() int32

func (*PlayerState) GetY

func (x *PlayerState) GetY() int32

func (*PlayerState) ProtoMessage

func (*PlayerState) ProtoMessage()

func (*PlayerState) ProtoReflect

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

func (*PlayerState) Reset

func (x *PlayerState) Reset()

func (*PlayerState) String

func (x *PlayerState) String() string

type ServerMessage

type ServerMessage struct {
	PlayerId        int32          `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"`
	Players         []*PlayerState `protobuf:"bytes,2,rep,name=players,proto3" json:"players,omitempty"`
	CurrentTick     int64          `protobuf:"varint,3,opt,name=current_tick,json=currentTick,proto3" json:"current_tick,omitempty"`
	ChatMessages    []*ChatMessage `protobuf:"bytes,4,rep,name=chat_messages,json=chatMessages,proto3" json:"chat_messages,omitempty"`
	AuthSuccess     bool           `protobuf:"varint,5,opt,name=auth_success,json=authSuccess,proto3" json:"auth_success,omitempty"`
	ErrorMessage    string         `protobuf:"bytes,6,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	ProtocolVersion int32          `protobuf:"varint,7,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerMessage) Descriptor deprecated

func (*ServerMessage) Descriptor() ([]byte, []int)

Deprecated: Use ServerMessage.ProtoReflect.Descriptor instead.

func (*ServerMessage) GetAuthSuccess

func (x *ServerMessage) GetAuthSuccess() bool

func (*ServerMessage) GetChatMessages

func (x *ServerMessage) GetChatMessages() []*ChatMessage

func (*ServerMessage) GetCurrentTick

func (x *ServerMessage) GetCurrentTick() int64

func (*ServerMessage) GetErrorMessage

func (x *ServerMessage) GetErrorMessage() string

func (*ServerMessage) GetPlayerId

func (x *ServerMessage) GetPlayerId() int32

func (*ServerMessage) GetPlayers

func (x *ServerMessage) GetPlayers() []*PlayerState

func (*ServerMessage) GetProtocolVersion

func (x *ServerMessage) GetProtocolVersion() int32

func (*ServerMessage) ProtoMessage

func (*ServerMessage) ProtoMessage()

func (*ServerMessage) ProtoReflect

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

func (*ServerMessage) Reset

func (x *ServerMessage) Reset()

func (*ServerMessage) String

func (x *ServerMessage) String() string

Jump to

Keyboard shortcuts

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