mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-11 10:33:16 +01:00
examples/vibrate: bug fix: touches didn't work correctly
This commit is contained in:
parent
93e9e8249f
commit
c790d8aa7a
@ -39,7 +39,7 @@ type Game struct {
|
|||||||
|
|
||||||
func (g *Game) Update() error {
|
func (g *Game) Update() error {
|
||||||
g.touchIDs = g.touchIDs[:0]
|
g.touchIDs = g.touchIDs[:0]
|
||||||
g.touchIDs = inpututil.AppendJustPressedTouchIDs(g.touchIDs)
|
g.touchIDs = inpututil.AppendJustPressedTouchIDs(g.touchIDs[:0])
|
||||||
if len(g.touchIDs) > 0 {
|
if len(g.touchIDs) > 0 {
|
||||||
g.touchCounter++
|
g.touchCounter++
|
||||||
op := &ebiten.VibrateOptions{
|
op := &ebiten.VibrateOptions{
|
||||||
|
Loading…
Reference in New Issue
Block a user