mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +01:00
examples/airship: Show FPS
This commit is contained in:
parent
c2c3579cde
commit
17daf99c3c
@ -259,7 +259,7 @@ func update(screen *ebiten.Image) error {
|
|||||||
|
|
||||||
// Draw the message.
|
// Draw the message.
|
||||||
tutrial := "Space: Move forward\nLeft/Right: Rotate"
|
tutrial := "Space: Move forward\nLeft/Right: Rotate"
|
||||||
msg := fmt.Sprintf("TPS: %0.2f\n%s", ebiten.CurrentTPS(), tutrial)
|
msg := fmt.Sprintf("TPS: %0.2f\nFPS: %0.2f\n%s", ebiten.CurrentTPS(), ebiten.CurrentFPS(), tutrial)
|
||||||
ebitenutil.DebugPrint(screen, msg)
|
ebitenutil.DebugPrint(screen, msg)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user