mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-03 12:28:03 +08:00
* Migrate flame_forge2d to monorepo * Put in the temporary publish to none * Update docs * Add dart_code_metrics * Add analysis options * Fix analyze issues * Fix formatting * Add dart_code_metrics to flame_forge2d example
14 lines
366 B
Dart
14 lines
366 B
Dart
import 'package:flame/gestures.dart';
|
|
import 'domino_sample.dart';
|
|
|
|
class CameraSample extends DominoSample {
|
|
@override
|
|
void onTapDown(TapDownInfo details) {
|
|
final position = details.eventPosition.game;
|
|
final pizza = Pizza(position, pizzaImage);
|
|
add(pizza);
|
|
final component = pizza.positionComponent;
|
|
camera.followComponent(component);
|
|
}
|
|
}
|