Esempio n. 1
0
func main() {
	opts := engi.RunOptions{
		Title:  "Falling Demo",
		Width:  1024,
		Height: 640,
	}
	engi.Open(opts, &Game{})
}
Esempio n. 2
0
func main() {
	opts := engi.RunOptions{
		Title:  "EdgeScroller Demo",
		Width:  1024,
		Height: 640,
	}
	engi.Open(opts, &Game{})
}
Esempio n. 3
0
func main() {
	opts := engi.RunOptions{
		Title:  "KeyboardScroller Demo",
		Width:  int(worldWidth),
		Height: int(worldHeight),
	}
	engi.Open(opts, &Game{})
}
Esempio n. 4
0
func main() {
	opts := engi.RunOptions{
		Title:  "Zoom Demo",
		Width:  400,
		Height: 400,
	}
	engi.Open(opts, &Game{})
}
Esempio n. 5
0
func main() {
	opts := engi.RunOptions{
		Title:  "Show and Hide Demo",
		Width:  1024,
		Height: 640,
	}
	engi.Open(opts, &GameWorld{})
}
Esempio n. 6
0
func main() {
	opts := engi.RunOptions{
		Title:         "Pong Demo",
		Width:         800,
		Height:        800,
		ScaleOnResize: true,
	}
	engi.Open(opts, &PongGame{})
}
Esempio n. 7
0
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)
}
Esempio n. 8
0
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{})
}
Esempio n. 9
0
func main() {
	World = &GameWorld{}
	engi.Open("Hello", 1024, 640, false, World)
}
Esempio n. 10
0
func main() {
	W = Game{}
	engi.Open("Falling Demo", 800, 800, false, &W)
}
Esempio n. 11
0
File: pong.go Progetto: Kunde21/engi
func main() {
	engi.Open("Pong", 800, 800, false, &PongGame{})
}
Esempio n. 12
0
func main() {
	engi.Open("KeyboardScroller Demo", 400, 400, false, &Game{})
}
Esempio n. 13
0
File: anim.go Progetto: Kunde21/engi
func main() {
	World = &GameWorld{}
	engi.Open("Animation Demo", 1024, 640, false, World)
}
Esempio n. 14
0
File: hide.go Progetto: Kunde21/engi
func main() {
	World = &GameWorld{}
	engi.Open("Show and Hide Demo", 1024, 640, false, World)
}
Esempio n. 15
0
func main() {
	World = &GameWorld{}
	engi.Open("Pause Demo", 1024, 640, false, World)
}
Esempio n. 16
0
File: zoom.go Progetto: Kunde21/engi
func main() {
	engi.Open("Zoom Demo", 400, 400, false, &Game{})
}
Esempio n. 17
0
func main() {
	opts := engi.RunOptions{
		HeadlessMode: true,
	}
	engi.Open(opts, &PongGame{})
}
Esempio n. 18
0
func main() {
	World = &Game{}
	engi.Open("Audio Demo", 1024, 640, false, World)
}
Esempio n. 19
0
func main() {
	engi.Open("EdgeScroller Demo", 400, 400, false, &Game{})
}