From 5e90c810794d8438f6ca04229e7c311a602ea833 Mon Sep 17 00:00:00 2001 From: Ollie Pugh Date: Tue, 12 Mar 2024 17:30:51 +0000 Subject: [PATCH] fix: clear movement after swipe --- .../entities/player/behaviors/player_drag_moving_behavior.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/trashy_road/lib/src/game/entities/player/behaviors/player_drag_moving_behavior.dart b/packages/trashy_road/lib/src/game/entities/player/behaviors/player_drag_moving_behavior.dart index 366bf37c..6b7b2f04 100644 --- a/packages/trashy_road/lib/src/game/entities/player/behaviors/player_drag_moving_behavior.dart +++ b/packages/trashy_road/lib/src/game/entities/player/behaviors/player_drag_moving_behavior.dart @@ -62,5 +62,8 @@ class PlayerDragMovingBehavior extends Behavior { _playerMovingBehavior.move(Direction.left); } } + + _startPosition = Offset.zero; + _lastPosition = Offset.zero; } }