File tree Expand file tree Collapse file tree
packages/flame/lib/src/gestures Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import 'package:flame/components.dart' ;
22import 'package:flame/events.dart' ;
33import 'package:flame/game.dart' ;
4- import 'package:flame/input.dart' ;
54
65class NineTileBoxCustomGridExample extends FlameGame
7- with TapCallbacks , DoubleTapDetector {
6+ with TapCallbacks , DoubleTapCallbacks {
87 static const String description = '''
98 If you want to create a background for something that can stretch you can
109 use the `NineTileBox` which is showcased here. In this example a custom
@@ -41,7 +40,7 @@ class NineTileBoxCustomGridExample extends FlameGame
4140 }
4241
4342 @override
44- void onDoubleTap ( ) {
43+ void onDoubleTapDown (_ ) {
4544 nineTileBoxComponent.scale.scale (0.8 );
4645 }
4746}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import 'package:flame/events.dart';
33import 'package:flame/game.dart' ;
44
55class NineTileBoxExample extends FlameGame
6- with TapCallbacks , DoubleTapDetector {
6+ with TapCallbacks , DoubleTapCallbacks {
77 static const String description = '''
88 If you want to create a background for something that can stretch you can
99 use the `NineTileBox` which is showcased here.\n\n
@@ -33,7 +33,7 @@ class NineTileBoxExample extends FlameGame
3333 }
3434
3535 @override
36- void onDoubleTap ( ) {
36+ void onDoubleTapDown (_ ) {
3737 nineTileBoxComponent.scale.scale (0.8 );
3838 }
3939}
Original file line number Diff line number Diff line change 11import 'package:flame/components.dart' ;
22import 'package:flame/events.dart' ;
33import 'package:flame/game.dart' ;
4- import 'package:flame/input.dart' ;
54
65class PauseResumeExample extends FlameGame
7- with TapCallbacks , DoubleTapDetector {
6+ with TapCallbacks , DoubleTapCallbacks {
87 static const description = '''
98 Demonstrate how to use the pause and resume engine methods and paused
109 attribute.
@@ -47,7 +46,7 @@ class PauseResumeExample extends FlameGame
4746 }
4847
4948 @override
50- void onDoubleTap ( ) {
49+ void onDoubleTapDown (_ ) {
5150 paused = ! paused;
5251 }
5352}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import 'package:flame/game.dart';
44import 'package:flutter/material.dart' ;
55
66class TimerComponentExample extends FlameGame
7- with TapCallbacks , DoubleTapDetector {
7+ with TapCallbacks , DoubleTapCallbacks {
88 static const String description = '''
99 This examples showcases the `TimerComponent`.\n\n
1010 Tap to start a timer that lives for one second and double tap to start
@@ -22,7 +22,7 @@ class TimerComponentExample extends FlameGame
2222 }
2323
2424 @override
25- void onDoubleTap ( ) {
25+ void onDoubleTapDown (_ ) {
2626 doubleTapComponent? .removeFromParent ();
2727 doubleTapComponent = RenderedTimeComponent (5 , yOffset: 180 );
2828 add (doubleTapComponent! );
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ mixin TapDetector on Game {
1818 }
1919}
2020
21+ @Deprecated ('Use SecondaryTapCallbacks instead' )
2122mixin SecondaryTapDetector on Game {
2223 void onSecondaryTapDown (TapDownInfo info) {}
2324 void onSecondaryTapUp (TapUpInfo info) {}
@@ -32,6 +33,7 @@ mixin SecondaryTapDetector on Game {
3233 }
3334}
3435
36+ @Deprecated ('Use TertiaryTapCallbacks instead' )
3537mixin TertiaryTapDetector on Game {
3638 void onTertiaryTapDown (TapDownInfo info) {}
3739 void onTertiaryTapUp (TapUpInfo info) {}
@@ -46,6 +48,7 @@ mixin TertiaryTapDetector on Game {
4648 }
4749}
4850
51+ @Deprecated ('Use DoubleTapCallbacks instead' )
4952mixin DoubleTapDetector on Game {
5053 void onDoubleTap () {}
5154 void onDoubleTapCancel () {}
@@ -56,6 +59,7 @@ mixin DoubleTapDetector on Game {
5659 }
5760}
5861
62+ @Deprecated ('Use LongPressCallbacks instead' )
5963mixin LongPressDetector on Game {
6064 void onLongPress () {}
6165 void onLongPressStart (LongPressStartInfo info) {}
You can’t perform that action at this time.
0 commit comments