examples/flappy: bug fix: touches didn't work

Closes #2067
This commit is contained in:
Hajime Hoshi 2022-04-11 10:43:53 +09:00
parent 79f031ae9a
commit f19e9c75b1

View File

@ -205,7 +205,7 @@ func (g *Game) isKeyJustPressed() bool {
if inpututil.IsMouseButtonJustPressed(ebiten.MouseButtonLeft) {
return true
}
g.touchIDs = inpututil.AppendJustPressedTouchIDs(g.touchIDs)
g.touchIDs = inpututil.AppendJustPressedTouchIDs(g.touchIDs[:0])
if len(g.touchIDs) > 0 {
return true
}