當前位置: 首頁>>代碼示例>>Golang>>正文


Golang engi.Open函數代碼示例

本文整理匯總了Golang中github.com/paked/engi.Open函數的典型用法代碼示例。如果您正苦於以下問題:Golang Open函數的具體用法?Golang Open怎麽用?Golang Open使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了Open函數的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: main

func main() {
	opts := engi.RunOptions{
		Title:  "Falling Demo",
		Width:  1024,
		Height: 640,
	}
	engi.Open(opts, &Game{})
}
開發者ID:EtienneBruines,項目名稱:engi,代碼行數:8,代碼來源:falling.go

示例2: main

func main() {
	opts := engi.RunOptions{
		Title:  "KeyboardScroller Demo",
		Width:  int(worldWidth),
		Height: int(worldHeight),
	}
	engi.Open(opts, &Game{})
}
開發者ID:EtienneBruines,項目名稱:engi,代碼行數:8,代碼來源:kbscroller.go

示例3: main

func main() {
	opts := engi.RunOptions{
		Title:  "Zoom Demo",
		Width:  400,
		Height: 400,
	}
	engi.Open(opts, &Game{})
}
開發者ID:EtienneBruines,項目名稱:engi,代碼行數:8,代碼來源:zoom.go

示例4: main

func main() {
	opts := engi.RunOptions{
		Title:  "Show and Hide Demo",
		Width:  1024,
		Height: 640,
	}
	engi.Open(opts, &GameWorld{})
}
開發者ID:EtienneBruines,項目名稱:engi,代碼行數:8,代碼來源:hide.go

示例5: main

func main() {
	opts := engi.RunOptions{
		Title:         "Pong Demo",
		Width:         800,
		Height:        800,
		ScaleOnResize: true,
	}
	engi.Open(opts, &PongGame{})
}
開發者ID:EtienneBruines,項目名稱:engi,代碼行數:9,代碼來源:pong.go

示例6: main

func main() {
	iconScene = &IconScene{}
	rockScene = &RockScene{}

	// Register other Scenes for later use, this can be done from anywhere, as long as it
	// happens before calling engi.SetSceneByName
	engi.RegisterScene(rockScene)

	opts := engi.RunOptions{
		Title:  "Scenes Demo",
		Width:  1024,
		Height: 640,
	}

	engi.Open(opts, iconScene)
}
開發者ID:EtienneBruines,項目名稱:engi,代碼行數:16,代碼來源:scenes.go

示例7: main

func main() {
	if cpuprofile != "" {
		f, err := os.Create(cpuprofile)
		if err != nil {
			log.Fatal(err)
		}
		pprof.StartCPUProfile(f)
		defer pprof.StopCPUProfile()
		c := make(chan os.Signal, 1)
		signal.Notify(c, os.Interrupt)
		go func() {
			for range c {
				pprof.StopCPUProfile()
				os.Exit(0)
			}
		}()
	}

	engi.RegisterScene(&scenes.Menu{})
	engi.RegisterScene(&scenes.Calibrate{})

	// TODO: don't hardcode this
	engi.Open(gameTitle, 1600, 800, false, &BCIGame{})
}
開發者ID:EtienneBruines,項目名稱:bcigame,代碼行數:24,代碼來源:game.go

示例8: main

func main() {
	World = &GameWorld{}
	engi.Open("Hello", 1024, 640, false, World)
}
開發者ID:EtienneBruines,項目名稱:engi,代碼行數:4,代碼來源:tilemap.go

示例9: main

func main() {
	W = Game{}
	engi.Open("Falling Demo", 800, 800, false, &W)
}
開發者ID:Kunde21,項目名稱:engi,代碼行數:4,代碼來源:falling.go

示例10: main

func main() {
	engi.Open("Pong", 800, 800, false, &PongGame{})
}
開發者ID:Kunde21,項目名稱:engi,代碼行數:3,代碼來源:pong.go

示例11: main

func main() {
	engi.Open("KeyboardScroller Demo", 400, 400, false, &Game{})
}
開發者ID:Kunde21,項目名稱:engi,代碼行數:3,代碼來源:kbscroller.go

示例12: main

func main() {
	opts := engi.RunOptions{
		HeadlessMode: true,
	}
	engi.Open(opts, &PongGame{})
}
開發者ID:EtienneBruines,項目名稱:engi,代碼行數:6,代碼來源:headless.go

示例13: main

func main() {
	World = &Game{}
	engi.Open("Audio Demo", 1024, 640, false, World)
}
開發者ID:Kunde21,項目名稱:engi,代碼行數:4,代碼來源:audio.go


注:本文中的github.com/paked/engi.Open函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。