24 lines
No EOL
652 B
Dart
24 lines
No EOL
652 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:shitman/game/shitman_game.dart';
|
|
import 'package:shitman/ui/touch_controls.dart';
|
|
|
|
/// Touch controls overlay widget
|
|
class TouchControlsOverlayWidget extends StatelessWidget {
|
|
static const String overlayID = 'TouchControls';
|
|
|
|
const TouchControlsOverlayWidget({
|
|
super.key,
|
|
required this.game,
|
|
});
|
|
|
|
final ShitmanGame game;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return TouchControlsOverlay(
|
|
onMove: (input) => game.handleTouchMovement(input),
|
|
onPoopBag: () => game.handleTouchPoopBag(),
|
|
onDoorbell: () => game.handleTouchDoorbell(),
|
|
);
|
|
}
|
|
} |