Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import 'package:flame/components.dart';
import 'package:flame/events.dart';
import 'package:flame/game.dart';
import 'package:flame/input.dart';

class NineTileBoxCustomGridExample extends FlameGame
with TapCallbacks, DoubleTapDetector {
with TapCallbacks, DoubleTapCallbacks {
static const String description = '''
If you want to create a background for something that can stretch you can
use the `NineTileBox` which is showcased here. In this example a custom
Expand Down Expand Up @@ -41,7 +40,7 @@ class NineTileBoxCustomGridExample extends FlameGame
}

@override
void onDoubleTap() {
void onDoubleTapDown(_) {
nineTileBoxComponent.scale.scale(0.8);
}
}
4 changes: 2 additions & 2 deletions examples/lib/stories/rendering/nine_tile_box_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flame/events.dart';
import 'package:flame/game.dart';

class NineTileBoxExample extends FlameGame
with TapCallbacks, DoubleTapDetector {
with TapCallbacks, DoubleTapCallbacks {
static const String description = '''
If you want to create a background for something that can stretch you can
use the `NineTileBox` which is showcased here.\n\n
Expand Down Expand Up @@ -33,7 +33,7 @@ class NineTileBoxExample extends FlameGame
}

@override
void onDoubleTap() {
void onDoubleTapDown(_) {
nineTileBoxComponent.scale.scale(0.8);
}
}
5 changes: 2 additions & 3 deletions examples/lib/stories/system/pause_resume_example.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import 'package:flame/components.dart';
import 'package:flame/events.dart';
import 'package:flame/game.dart';
import 'package:flame/input.dart';

class PauseResumeExample extends FlameGame
with TapCallbacks, DoubleTapDetector {
with TapCallbacks, DoubleTapCallbacks {
static const description = '''
Demonstrate how to use the pause and resume engine methods and paused
attribute.
Expand Down Expand Up @@ -47,7 +46,7 @@ class PauseResumeExample extends FlameGame
}

@override
void onDoubleTap() {
void onDoubleTapDown(_) {
paused = !paused;
}
}
4 changes: 2 additions & 2 deletions examples/lib/stories/utils/timer_component_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:flame/game.dart';
import 'package:flutter/material.dart';

class TimerComponentExample extends FlameGame
with TapCallbacks, DoubleTapDetector {
with TapCallbacks, DoubleTapCallbacks {
static const String description = '''
This examples showcases the `TimerComponent`.\n\n
Tap to start a timer that lives for one second and double tap to start
Expand All @@ -22,7 +22,7 @@ class TimerComponentExample extends FlameGame
}

@override
void onDoubleTap() {
void onDoubleTapDown(_) {
doubleTapComponent?.removeFromParent();
doubleTapComponent = RenderedTimeComponent(5, yOffset: 180);
add(doubleTapComponent!);
Expand Down
4 changes: 4 additions & 0 deletions packages/flame/lib/src/gestures/detectors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ mixin TapDetector on Game {
}
}

@Deprecated('Use SecondaryTapCallbacks instead')
mixin SecondaryTapDetector on Game {
void onSecondaryTapDown(TapDownInfo info) {}
void onSecondaryTapUp(TapUpInfo info) {}
Expand All @@ -32,6 +33,7 @@ mixin SecondaryTapDetector on Game {
}
}

@Deprecated('Use TertiaryTapCallbacks instead')
mixin TertiaryTapDetector on Game {
void onTertiaryTapDown(TapDownInfo info) {}
void onTertiaryTapUp(TapUpInfo info) {}
Expand All @@ -46,6 +48,7 @@ mixin TertiaryTapDetector on Game {
}
}

@Deprecated('Use DoubleTapCallbacks instead')
mixin DoubleTapDetector on Game {
void onDoubleTap() {}
void onDoubleTapCancel() {}
Expand All @@ -56,6 +59,7 @@ mixin DoubleTapDetector on Game {
}
}

@Deprecated('Use LongPressCallbacks instead')
mixin LongPressDetector on Game {
void onLongPress() {}
void onLongPressStart(LongPressStartInfo info) {}
Expand Down
Loading