func Start() { defer func() { if p := recover(); p != nil { fmt.Println(p, engine.PanicPath()) } engine.Terminate() }() engine.StartEngine() _ = game.GameSceneGeneral _ = networkOnline.GameSceneGeneral _ = login.LoginSceneGeneral _ = zumbies.GameSceneGeneral /* Running local server. */ go server.StartServer() scene := 0 engine.LoadScene(login.LoginSceneGeneral) for engine.MainLoop() { if input.KeyPress('`') { scene = (scene + 1) % 3 switch scene { case 0: engine.LoadScene(login.LoginSceneGeneral) case 1: engine.LoadScene(networkOnline.GameSceneGeneral) case 2: engine.LoadScene(zumbies.GameSceneGeneral) } } } }
func main() { server.StartServer() }