mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
Run Sprites
This commit is contained in:
parent
5e2e0a0760
commit
970b087035
@ -92,9 +92,20 @@ func (ui *GlutUI) Run(device graphics.Device) {
|
|||||||
func main() {
|
func main() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
|
||||||
game := game.NewRotatingImage()
|
gameName := ""
|
||||||
|
if 2 <= len(os.Args) {
|
||||||
|
gameName = os.Args[1]
|
||||||
|
}
|
||||||
|
|
||||||
|
var gm ebiten.Game
|
||||||
|
switch gameName {
|
||||||
|
case "sprites":
|
||||||
|
gm = game.NewSprites()
|
||||||
|
default:
|
||||||
|
gm = game.NewRotatingImage()
|
||||||
|
}
|
||||||
currentUI = &GlutUI{}
|
currentUI = &GlutUI{}
|
||||||
currentUI.Init()
|
currentUI.Init()
|
||||||
|
|
||||||
ebiten.OpenGLRun(game, currentUI)
|
ebiten.OpenGLRun(gm, currentUI)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user