Documentation ¶
Index ¶
- type ClientListerHandler
- type GameServer
- func (this *GameServer) AddPlayer(player gentity.Player)
- func (this *GameServer) Exit()
- func (this *GameServer) GetPlayer(playerId int64) gentity.Player
- func (this *GameServer) Init(ctx context.Context, configFile string) bool
- func (this *GameServer) RemovePlayer(player gentity.Player)
- func (this *GameServer) Run(ctx context.Context)
- type GameServerConfig
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) 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)
删除一个在线玩家
Click to show internal directories.
Click to hide internal directories.