示例#1
0
文件: main.go 项目: WaylandGod/Go2D
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()
}
示例#2
0
文件: main.go 项目: WaylandGod/Go2D
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()
}
示例#3
0
文件: main.go 项目: ptrr/HeatSeeker
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()
}
示例#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()
}