示例#1
0
文件: server.go 项目: tbogdala/free
// NewServer creates a new server object and returns it.
func NewServer() *Server {
	s := new(Server)

	// setup the internal managers
	s.landscapeMan = landscape.NewManager()
	s.entityManager = entity.NewManager()

	return s
}
示例#2
0
// NewLocalGameManager returns a new local game manager
func NewLocalGameManager() *LocalGameManager {
	lgm := new(LocalGameManager)

	// setup the internal managers
	lgm.landscapeMan = landscape.NewManager()

	// setup the local game server
	lgm.gameServer = server.NewServer()

	// setup the entity manager
	lgm.entityManager = entity.NewManager()

	return lgm
}