examples/sprites: Skip rendering when the game is slow

This commit is contained in:
Hajime Hoshi 2016-04-08 03:31:10 +09:00
parent b2c5cb164a
commit 0c932fbf84

View File

@ -117,6 +117,9 @@ func update(screen *ebiten.Image) error {
}
sprites.Update()
if ebiten.IsRunningSlowly() {
return nil
}
op := &ebiten.DrawImageOptions{
ImageParts: sprites,
}