本文整理汇总了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{})
}
示例2: main
func main() {
opts := engi.RunOptions{
Title: "KeyboardScroller Demo",
Width: int(worldWidth),
Height: int(worldHeight),
}
engi.Open(opts, &Game{})
}
示例3: main
func main() {
opts := engi.RunOptions{
Title: "Zoom Demo",
Width: 400,
Height: 400,
}
engi.Open(opts, &Game{})
}
示例4: main
func main() {
opts := engi.RunOptions{
Title: "Show and Hide Demo",
Width: 1024,
Height: 640,
}
engi.Open(opts, &GameWorld{})
}
示例5: main
func main() {
opts := engi.RunOptions{
Title: "Pong Demo",
Width: 800,
Height: 800,
ScaleOnResize: true,
}
engi.Open(opts, &PongGame{})
}
示例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)
}
示例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{})
}
示例8: main
func main() {
World = &GameWorld{}
engi.Open("Hello", 1024, 640, false, World)
}
示例9: main
func main() {
W = Game{}
engi.Open("Falling Demo", 800, 800, false, &W)
}
示例10: main
func main() {
engi.Open("Pong", 800, 800, false, &PongGame{})
}
示例11: main
func main() {
engi.Open("KeyboardScroller Demo", 400, 400, false, &Game{})
}
示例12: main
func main() {
opts := engi.RunOptions{
HeadlessMode: true,
}
engi.Open(opts, &PongGame{})
}
示例13: main
func main() {
World = &Game{}
engi.Open("Audio Demo", 1024, 640, false, World)
}