mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
examples/sprites: Skip rendering when the game is slow
This commit is contained in:
parent
b2c5cb164a
commit
0c932fbf84
@ -117,6 +117,9 @@ func update(screen *ebiten.Image) error {
|
|||||||
}
|
}
|
||||||
sprites.Update()
|
sprites.Update()
|
||||||
|
|
||||||
|
if ebiten.IsRunningSlowly() {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
op := &ebiten.DrawImageOptions{
|
op := &ebiten.DrawImageOptions{
|
||||||
ImageParts: sprites,
|
ImageParts: sprites,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user