examples/lines: show FPS/TPS

This commit is contained in:
Hajime Hoshi 2022-10-15 02:23:26 +09:00
parent 32a2a705c0
commit bcc5dc1703

View File

@ -15,6 +15,7 @@
package main
import (
"fmt"
"image"
"image/color"
"log"
@ -130,8 +131,9 @@ func (g *Game) Draw(screen *ebiten.Image) {
screen.DrawImage(g.offscreen, op)
}
msg := `Press A to switch anti-aliasing.
Press C to switch to draw the center lines.`
msg := fmt.Sprintf(`FPS: %0.2f, TPS: %0.2f
Press A to switch anti-aliasing.
Press C to switch to draw the center lines.`, ebiten.ActualFPS(), ebiten.ActualTPS())
ebitenutil.DebugPrint(screen, msg)
}