Exemplo n.º 1
0
func main() {
	g_game = go2d.NewGame("Test Game")
	g_game.SetDimensions(WINDOW_WIDTH, WINDOW_HEIGHT)
	g_game.SetD3D(true)

	g_game.SetInitFun(start)
	g_game.SetUpdateFun(update)
	g_game.SetDrawFun(draw)

	g_game.Run()
}
Exemplo n.º 2
0
func main() {
	game := go2d.NewGame("Test Game")
	game.SetDimensions(800, 600)
	game.SetD3D(true)

	game.SetInitFun(start)
	game.SetUpdateFun(update)
	game.SetDrawFun(draw)

	game.SetMouseUpFun(mouseUp)
	game.SetTextInputFun(textInput)
	game.SetKeyDownFun(keyDown)

	game.Run()
}
Exemplo n.º 3
0
func main() {
	game := go2d.NewGame("Heatseeker")
	game.SetDimensions(SCREEN_WIDTH, SCREEN_HEIGHT)

	//Set to false when OpenGL should also be defaulted on Windows
	game.SetD3D(true)

	game.SetInitFun(start)
	game.SetUpdateFun(update)
	game.SetDrawFun(draw)

	game.SetMouseMoveFun(mouseMove)
	game.SetMouseDownFun(mouseDown)
	game.SetMouseUpFun(mouseUp)
	game.SetTextInputFun(textInput)
	game.SetKeyDownFun(keyDown)

	game.Run()
}
Exemplo n.º 4
0
func main() {
	game := go2d.NewGame("Skeleton")
	game.SetDimensions(200, 200)

	//Set to false when OpenGL should also be defaulted on Windows
	game.SetD3D(true)

	game.SetInitFun(start)
	game.SetUpdateFun(update)
	game.SetDrawFun(draw)

	game.SetMouseMoveFun(mouseMove)
	game.SetMouseDownFun(mouseDown)
	game.SetMouseUpFun(mouseUp)
	game.SetTextInputFun(textInput)
	game.SetKeyDownFun(keyDown)

	game.Run()
}