Example #1
0
func Start() {
	defer func() {
		if p := recover(); p != nil {
			fmt.Println(p, engine.PanicPath())
		}

		engine.Terminate()
	}()
	engine.StartEngine()
	_ = Game.MenuSceneG

	/*
		Running local server.
	*/
	//go Server.StartServer()

	engine.LoadScene(Game.MenuSceneG)
	for engine.MainLoop() {

	}
}
Example #2
0
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)
			}

		}
	}
}