File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ import 'package:meta/meta.dart';
1010/// In addition to adding this mixin, the component must also implement the
1111/// [containsLocalPoint] method -- the component will only be considered
1212/// "tapped" if the point where the tap has occurred is inside the component.
13+ ///
14+ /// Note that FlameGame _is_ a [Component] and does implement
15+ /// [containsLocalPoint] ; so this can be used at the game level.
1316mixin TapCallbacks on Component {
1417 void onTapDown (TapDownEvent event) {}
1518 void onLongTapDown (TapDownEvent event) {}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import 'package:flame/src/game/game.dart';
22import 'package:flame/src/gestures/events.dart' ;
33import 'package:flutter/gestures.dart' ;
44
5- // Basic touch detectors
5+ @Deprecated ( 'Use TapCallbacks instead' )
66mixin TapDetector on Game {
77 void onTap () {}
88 void onTapCancel () {}
You can’t perform that action at this time.
0 commit comments