match_magic/lib/utilities/audio_manager.dart
2024-09-09 15:09:43 +03:00

24 lines
473 B
Dart

import 'package:flame_audio/flame_audio.dart';
class AudioManager {
static Future<void> load() async {
await FlameAudio.audioCache.loadAll([
'select.ogg',
'four_elements.ogg',
'explosion.ogg',
]);
}
static void playSelectSound() {
FlameAudio.play('select.ogg');
}
static void playFourElementsSound() {
FlameAudio.play('four_elements.ogg');
}
static void playExplosionSound() {
FlameAudio.play('explosion.ogg');
}
}