mirror of https://github.com/flutter/pinball.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
525 B
16 lines
525 B
// ignore_for_file: public_member_api_docs
|
|
|
|
import 'package:flame/components.dart';
|
|
import 'package:flame_forge2d/flame_forge2d.dart';
|
|
import 'package:pinball/game/pinball_game.dart';
|
|
import 'package:pinball_audio/pinball_audio.dart';
|
|
import 'package:pinball_flame/pinball_flame.dart';
|
|
|
|
class BumperNoisyBehavior extends ContactBehavior with HasGameRef<PinballGame> {
|
|
@override
|
|
void beginContact(Object other, Contact contact) {
|
|
super.beginContact(other, contact);
|
|
gameRef.player.play(PinballAudio.bumper);
|
|
}
|
|
}
|