mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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()
|
||||
|
||||
if ebiten.IsRunningSlowly() {
|
||||
return nil
|
||||
}
|
||||
op := &ebiten.DrawImageOptions{
|
||||
ImageParts: sprites,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user