gameserver

package
v0.0.0-...-bfc2f26 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientListerHandler

type ClientListerHandler struct {
}

客户端listener handler

func (*ClientListerHandler) OnConnectionConnected

func (this *ClientListerHandler) OnConnectionConnected(listener Listener, acceptedConnection Connection)

func (*ClientListerHandler) OnConnectionDisconnect

func (this *ClientListerHandler) OnConnectionDisconnect(listener Listener, connection Connection)

客户端断开连接

type GameServer

type GameServer struct {
	BaseServer
	// contains filtered or unexported fields
}

游戏服

func (*GameServer) AddPlayer

func (this *GameServer) AddPlayer(player gentity.Player)

添加一个在线玩家

func (*GameServer) Exit

func (this *GameServer) Exit()

退出

func (*GameServer) GetPlayer

func (this *GameServer) GetPlayer(playerId int64) gentity.Player

获取一个在线玩家

func (*GameServer) Init

func (this *GameServer) Init(ctx context.Context, configFile string) bool

初始化

func (*GameServer) RemovePlayer

func (this *GameServer) RemovePlayer(player gentity.Player)

删除一个在线玩家

func (*GameServer) Run

func (this *GameServer) Run(ctx context.Context)

运行

type GameServerConfig

type GameServerConfig struct {
	BaseServerConfig
}

游戏服配置

Jump to

Keyboard shortcuts

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