game

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2018 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGameID

func GetGameID() uint16

GetGameID returns the current Game Server ID

func Run

func Run(delegate IGameDelegate)

Run runs the game server

This is the main game server loop

Types

type GameDelegate

type GameDelegate struct {
}

GameDelegate is the default IGameDelegate implementation

func (*GameDelegate) OnGameReady

func (gd *GameDelegate) OnGameReady()

OnGameReady is called when game is ready

type GameService added in v0.1.2

type GameService struct {
	// contains filtered or unexported fields
}

func (*GameService) HandleCallEntityMethod added in v0.1.2

func (gs *GameService) HandleCallEntityMethod(entityID common.EntityID, method string, args [][]byte, clientid common.ClientID)

func (*GameService) HandleCreateEntityAnywhere added in v0.1.2

func (gs *GameService) HandleCreateEntityAnywhere(entityid common.EntityID, typeName string, data map[string]interface{})

func (*GameService) HandleDeclareService added in v0.1.2

func (gs *GameService) HandleDeclareService(entityID common.EntityID, serviceName string)

func (*GameService) HandleGateDisconnected added in v0.1.2

func (gs *GameService) HandleGateDisconnected(gateid uint16)

func (*GameService) HandleLoadEntityAnywhere added in v0.1.2

func (gs *GameService) HandleLoadEntityAnywhere(typeName string, entityID common.EntityID)

func (*GameService) HandleMigrateRequestAck added in v0.1.2

func (gs *GameService) HandleMigrateRequestAck(pkt *netutil.Packet)

func (*GameService) HandleNotifyAllGamesConnected added in v0.1.2

func (gs *GameService) HandleNotifyAllGamesConnected()

func (*GameService) HandleNotifyClientConnected added in v0.1.2

func (gs *GameService) HandleNotifyClientConnected(clientid common.ClientID, gateid uint16)

func (*GameService) HandleNotifyClientDisconnected added in v0.1.2

func (gs *GameService) HandleNotifyClientDisconnected(clientid common.ClientID)

func (*GameService) HandleQuerySpaceGameIDForMigrateAck added in v0.1.2

func (gs *GameService) HandleQuerySpaceGameIDForMigrateAck(pkt *netutil.Packet)

func (*GameService) HandleRealMigrate added in v0.1.2

func (gs *GameService) HandleRealMigrate(pkt *netutil.Packet)

func (*GameService) HandleStartFreezeGameAck added in v0.1.2

func (gs *GameService) HandleStartFreezeGameAck(dispid uint16)

func (*GameService) HandleSyncPositionYawFromClient added in v0.1.2

func (gs *GameService) HandleSyncPositionYawFromClient(pkt *netutil.Packet)

func (*GameService) HandleUndeclareService added in v0.1.2

func (gs *GameService) HandleUndeclareService(entityID common.EntityID, serviceName string)

func (*GameService) String added in v0.1.2

func (gs *GameService) String() string

type IGameDelegate

type IGameDelegate interface {
	OnGameReady()
}

IGameDelegate defines interfaces for handling game server events

Jump to

Keyboard shortcuts

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