Beispiel #1
0
// 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
}
Beispiel #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
}