mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-13 03:10:42 +08:00
fix: Fill in mount implementation in HasTappables (#2496)
HasTappables also needs the same full implementation in mount as HasTappableComponents has for Tappable to work properly.
This commit is contained in:
@@ -79,7 +79,16 @@ mixin HasTappables on FlameGame implements MultiTapListener {
|
||||
void mount() {
|
||||
gestureDetectors.add<MultiTapGestureRecognizer>(
|
||||
MultiTapGestureRecognizer.new,
|
||||
(MultiTapGestureRecognizer instance) {},
|
||||
(MultiTapGestureRecognizer instance) {
|
||||
instance.longTapDelay = Duration(
|
||||
milliseconds: (longTapDelay * 1000).toInt(),
|
||||
);
|
||||
instance.onTap = handleTap;
|
||||
instance.onTapDown = handleTapDown;
|
||||
instance.onTapUp = handleTapUp;
|
||||
instance.onTapCancel = handleTapCancel;
|
||||
instance.onLongTapDown = handleLongTapDown;
|
||||
},
|
||||
);
|
||||
super.mount();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user