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
3 years ago
|
// 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';
|
||
3 years ago
|
import 'package:pinball_audio/pinball_audio.dart';
|
||
3 years ago
|
import 'package:pinball_flame/pinball_flame.dart';
|
||
|
|
||
3 years ago
|
class BumperNoiseBehavior extends ContactBehavior with HasGameRef<PinballGame> {
|
||
3 years ago
|
@override
|
||
|
void beginContact(Object other, Contact contact) {
|
||
|
super.beginContact(other, contact);
|
||
3 years ago
|
gameRef.player.play(PinballAudio.bumper);
|
||
3 years ago
|
}
|
||
|
}
|