Documentation ¶
Index ¶
- func GetGameID() uint16
- func Run(delegate IGameDelegate)
- type GameDelegate
- type GameService
- func (gs *GameService) HandleCallEntityMethod(entityID common.EntityID, method string, args [][]byte, ...)
- func (gs *GameService) HandleCreateEntityAnywhere(entityid common.EntityID, typeName string, data map[string]interface{})
- func (gs *GameService) HandleDeclareService(entityID common.EntityID, serviceName string)
- func (gs *GameService) HandleGateDisconnected(gateid uint16)
- func (gs *GameService) HandleLoadEntityAnywhere(typeName string, entityID common.EntityID)
- func (gs *GameService) HandleMigrateRequestAck(pkt *netutil.Packet)
- func (gs *GameService) HandleNotifyAllGamesConnected()
- func (gs *GameService) HandleNotifyClientConnected(clientid common.ClientID, gateid uint16)
- func (gs *GameService) HandleNotifyClientDisconnected(clientid common.ClientID)
- func (gs *GameService) HandleQuerySpaceGameIDForMigrateAck(pkt *netutil.Packet)
- func (gs *GameService) HandleRealMigrate(pkt *netutil.Packet)
- func (gs *GameService) HandleStartFreezeGameAck(dispid uint16)
- func (gs *GameService) HandleSyncPositionYawFromClient(pkt *netutil.Packet)
- func (gs *GameService) HandleUndeclareService(entityID common.EntityID, serviceName string)
- func (gs *GameService) String() string
- type IGameDelegate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 (*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
Click to show internal directories.
Click to hide internal directories.