examples/doomfile: Skip renderFire when possible

This commit is contained in:
Hajime Hoshi 2019-02-15 00:54:11 +09:00
parent 3f28592700
commit b7c1d8db3c

View File

@ -120,12 +120,12 @@ func renderFire() {
func update(screen *ebiten.Image) error { func update(screen *ebiten.Image) error {
updateFirePixels() updateFirePixels()
renderFire()
if ebiten.IsDrawingSkipped() { if ebiten.IsDrawingSkipped() {
return nil return nil
} }
renderFire()
screen.ReplacePixels(pixels) screen.ReplacePixels(pixels)
return nil return nil
} }