runserver

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameConfigModel

type GameConfigModel struct {
	ServiceID   int           //游戏服务器ID
	PStatusTime time.Duration //打印状态的时间(秒)
}

GameConfigModel 游戏服务器的配置

type GameServiceBase

type GameServiceBase struct {
	ServiceStopHander  func() //当服务器被关掉的时候,先调用的方法
	ServiceStartHander func() //当服务器所有服务都启动后,先调用的方法
	// contains filtered or unexported fields
}

GameServiceBase 游戏模块管理

func NewGameService

func NewGameService(conf *GameConfigModel) *GameServiceBase

NewGameService 生成一个新的游戏服务器

func (*GameServiceBase) AddModule

func (gs *GameServiceBase) AddModule(md module.IModule)

AddModule 给这个管理器,加新的模块

func (*GameServiceBase) GetIsRun

func (gs *GameServiceBase) GetIsRun() bool

GetIsRun 我们游戏是不是还在运行着,如果为false表示我们服务器正在关闭中

func (*GameServiceBase) Run

func (gs *GameServiceBase) Run()

Run 运行游戏

Jump to

Keyboard shortcuts

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