toggle directly in scene's Draw, but fails too

This commit is contained in:
2024-06-01 00:02:26 +02:00
parent 8e821cbdc5
commit 507ac18853
4 changed files with 7 additions and 20 deletions

View File

@@ -1,6 +1,8 @@
package main
import (
"fmt"
"github.com/hajimehoshi/ebiten/v2"
)
@@ -51,9 +53,6 @@ func (game *Game) Update() error {
scene := game.GetCurrentScene()
scene.Update()
// FIXME: should work, but doesn't
//ebiten.SetScreenClearedEveryFrame(scene.Clearscreen())
next := scene.GetNext()
if next != game.CurrentScene {
@@ -64,7 +63,7 @@ func (game *Game) Update() error {
game.CurrentScene = next
}
//fmt.Printf("Clear Screen: %t\n", ebiten.IsScreenClearedEveryFrame())
fmt.Printf("Clear Screen: %t\n", ebiten.IsScreenClearedEveryFrame())
return nil
}