mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 10:54:51 +00:00
83 spelen van geluid geeft id terug (#86)
* Between commit
* Revert "Between commit"
This reverts commit 6c6e55492e.
* Removed debug print from main
* Removed class variables that are no longer used. Sound resources now generate a new Clip with the getNewClip() method.
* Successfully plays multiple instances of the same sound. Returns the clipID so the sound can be stopped.
* Added some comments
This commit is contained in:
@@ -14,14 +14,17 @@ import java.io.IOException;
|
||||
import java.nio.file.NotDirectoryException;
|
||||
|
||||
public class Main {
|
||||
static void main(String[] args) throws IOException, UnsupportedAudioFileException, LineUnavailableException {
|
||||
static void main(String[] args) throws IOException, UnsupportedAudioFileException, LineUnavailableException, InterruptedException {
|
||||
var a = new AssetManager(new File("app/src/main/resources/assets"));
|
||||
var b = new NetworkingClientManager();
|
||||
var c = new SoundManager(a);
|
||||
|
||||
// IO.println(a.getAssets());
|
||||
IO.println(c.getClips());
|
||||
|
||||
new EventFlow().addPostEvent(new AudioEvents.PlayAudio("mainmenu.wav", true)).asyncPostEvent();
|
||||
new EventFlow().addPostEvent(new AudioEvents.PlayAudio("sadtrombone.wav", true)).asyncPostEvent();
|
||||
Thread.sleep(200);
|
||||
new EventFlow().addPostEvent(new AudioEvents.PlayAudio("mainmenu.wav", true)).asyncPostEvent();
|
||||
new EventFlow().addPostEvent(new AudioEvents.PlayAudio("sadtrombone.wav", true)).asyncPostEvent();
|
||||
Thread.sleep(200);
|
||||
new EventFlow().addPostEvent(new AudioEvents.PlayAudio("mainmenu.wav", true)).asyncPostEvent();
|
||||
new EventFlow().addPostEvent(new AudioEvents.PlayAudio("sadtrombone.wav", true)).asyncPostEvent();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user