mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 19:04:49 +00:00
Naming and logging
This commit is contained in:
@@ -61,6 +61,7 @@ public class AssetLoader {
|
|||||||
fileSearcher(rootFolder, foundFiles);
|
fileSearcher(rootFolder, foundFiles);
|
||||||
this.totalCount = foundFiles.size();
|
this.totalCount = foundFiles.size();
|
||||||
loader(foundFiles);
|
loader(foundFiles);
|
||||||
|
logger.info("Total files loaded: " + this.totalCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class SoundManager {
|
|||||||
|
|
||||||
private void handlePlaySound(AudioEvents.PlayAudio event) {
|
private void handlePlaySound(AudioEvents.PlayAudio event) {
|
||||||
try {
|
try {
|
||||||
this.playSound(event.fileNameNoExtensionAndNoDirectory(), event.loop());
|
this.playSound(event.fileName(), event.loop());
|
||||||
} catch (UnsupportedAudioFileException | LineUnavailableException | IOException e) {
|
} catch (UnsupportedAudioFileException | LineUnavailableException | IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.toop.framework.eventbus.events.EventsBase;
|
|||||||
|
|
||||||
public class AudioEvents extends EventsBase {
|
public class AudioEvents extends EventsBase {
|
||||||
/** Starts playing a sound. */
|
/** Starts playing a sound. */
|
||||||
public record PlayAudio(String fileNameNoExtensionAndNoDirectory, boolean loop)
|
public record PlayAudio(String fileName, boolean loop)
|
||||||
implements EventWithoutSnowflake {}
|
implements EventWithoutSnowflake {}
|
||||||
|
|
||||||
public record StopAudio(long clipId) implements EventWithoutSnowflake {}
|
public record StopAudio(long clipId) implements EventWithoutSnowflake {}
|
||||||
|
|||||||
Reference in New Issue
Block a user