diff --git a/examples/flappy/main.go b/examples/flappy/main.go index e2faea936..1d5ad9377 100644 --- a/examples/flappy/main.go +++ b/examples/flappy/main.go @@ -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 }