examples/windowsize: Use more consts

This commit is contained in:
Hajime Hoshi 2018-07-17 22:36:55 +09:00
parent a7a1f6b4c6
commit eadbabffd9

View File

@ -133,14 +133,14 @@ func update(screen *ebiten.Image) error {
} }
if inpututil.IsKeyJustPressed(ebiten.KeyT) { if inpututil.IsKeyJustPressed(ebiten.KeyT) {
switch tps { switch tps {
case -1: case ebiten.UncappedTPS:
tps = 30 tps = 30
case 30: case 30:
tps = 60 tps = 60
case 60: case 60:
tps = 120 tps = 120
case 120: case 120:
tps = -1 tps = ebiten.UncappedTPS
default: default:
panic("not reached") panic("not reached")
} }