mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
examples/sprites: Add FPS
This commit is contained in:
parent
bf67998fc5
commit
e4d976e964
@ -174,8 +174,9 @@ func update(screen *ebiten.Image) error {
|
||||
screen.DrawImage(ebitenImage, op)
|
||||
}
|
||||
msg := fmt.Sprintf(`TPS: %0.2f
|
||||
FPS: %0.2f
|
||||
Num of sprites: %d
|
||||
Press <- or -> to change the number of sprites`, ebiten.CurrentTPS(), sprites.num)
|
||||
Press <- or -> to change the number of sprites`, ebiten.CurrentTPS(), ebiten.CurrentFPS(), sprites.num)
|
||||
ebitenutil.DebugPrint(screen, msg)
|
||||
return nil
|
||||
}
|
||||
|
@ -180,9 +180,10 @@ func update(screen *ebiten.Image) error {
|
||||
screen.DrawImage(ebitenImage, op)
|
||||
}
|
||||
msg := fmt.Sprintf(`TPS: %0.2f
|
||||
FPS: %0.2f
|
||||
Num of sprites: %d
|
||||
Press <- or -> to change the number of sprites
|
||||
Press Q to quit`, ebiten.CurrentTPS(), sprites.num)
|
||||
Press Q to quit`, ebiten.CurrentTPS(), ebiten.CurrentFPS(), sprites.num)
|
||||
ebitenutil.DebugPrint(screen, msg)
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user