mirror of
https://github.com/flame-engine/flame.git
synced 2025-10-30 16:36:57 +08:00
docs: Deprecate TapDetector in favour of TapCallbacks (#2886)
Deprecate `TapDetector` in favour of `TapCallbacks`
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
import 'package:flame/components.dart';
|
||||
import 'package:flame/events.dart';
|
||||
import 'package:flame/game.dart';
|
||||
import 'package:flame/input.dart';
|
||||
|
||||
class NineTileBoxExample extends FlameGame with TapDetector, DoubleTapDetector {
|
||||
class NineTileBoxExample extends FlameGame
|
||||
with TapCallbacks, DoubleTapDetector {
|
||||
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
|
||||
@ -27,7 +28,7 @@ class NineTileBoxExample extends FlameGame with TapDetector, DoubleTapDetector {
|
||||
}
|
||||
|
||||
@override
|
||||
void onTap() {
|
||||
void onTapDown(_) {
|
||||
nineTileBoxComponent.scale.scale(1.2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user