mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 20:13:50 +08:00
Fixes build (tests), adding ditance method to position, fix linting (formating, quotes), removed uneeded new keywords everywhere
This commit is contained in:
@ -19,14 +19,14 @@ class AudioPool {
|
||||
bool repeating;
|
||||
int minPlayers, maxPlayers;
|
||||
|
||||
Lock _lock = new Lock();
|
||||
Lock _lock = Lock();
|
||||
|
||||
AudioPool(this.sound,
|
||||
{this.repeating = false,
|
||||
this.maxPlayers = 1,
|
||||
this.minPlayers = 1,
|
||||
String prefix = 'audio/sfx/'}) {
|
||||
cache = new AudioCache(prefix: prefix);
|
||||
cache = AudioCache(prefix: prefix);
|
||||
}
|
||||
|
||||
void init() async {
|
||||
@ -66,7 +66,7 @@ class AudioPool {
|
||||
}
|
||||
|
||||
Future<AudioPlayer> _createNewAudioPlayer() async {
|
||||
AudioPlayer player = new AudioPlayer();
|
||||
AudioPlayer player = AudioPlayer();
|
||||
String url = (await cache.load(sound)).path;
|
||||
await player.setUrl(url);
|
||||
await player.setReleaseMode(ReleaseMode.STOP);
|
||||
|
||||
Reference in New Issue
Block a user