mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 11:43:19 +08:00
Making Flame events aware of camera (#755)
* some initial refactoring * Fixing examples and joystick component * Fixing examples * Addressing comments from PR * Fixing tutorials * Updating docs * Fixing tests * PR followup * A big follow up * linting * doc nit * Changelog and fix tutorial * Addressing comments * Fixing BaseGame project and scale offset methods * Formatting * doc suggestions * Update packages/flame/lib/src/gestures/events.dart Co-authored-by: Luan Nico <luanpotter27@gmail.com> * Hopefully, the last follow up * Linting and adding dart-code-metrics again * fixing tutorial Co-authored-by: Luan Nico <luanpotter27@gmail.com>
This commit is contained in:
@ -3,7 +3,6 @@ import 'dart:ui';
|
||||
import 'package:flame/components.dart';
|
||||
import 'package:flame/game.dart';
|
||||
import 'package:flame/gestures.dart';
|
||||
import 'package:flutter/gestures.dart' show TapDownDetails;
|
||||
|
||||
class BasicAnimations extends BaseGame with TapDetector {
|
||||
late Image chopper;
|
||||
@ -64,7 +63,7 @@ class BasicAnimations extends BaseGame with TapDetector {
|
||||
}
|
||||
|
||||
@override
|
||||
void onTapDown(TapDownDetails evt) {
|
||||
addAnimation(Vector2(evt.globalPosition.dx, evt.globalPosition.dy));
|
||||
void onTapDown(TapDownInfo event) {
|
||||
addAnimation(event.eventPosition.game);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user