mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 10:54:51 +00:00
AssetManager init
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package org.toop;
|
||||
|
||||
import org.toop.app.gui.LocalServerSelector;
|
||||
import org.toop.framework.audio.AudioFiles;
|
||||
import org.toop.framework.assets.AssetManager;
|
||||
import org.toop.framework.audio.SoundManager;
|
||||
import org.toop.framework.audio.events.AudioEvents;
|
||||
import org.toop.framework.eventbus.EventFlow;
|
||||
@@ -9,18 +9,24 @@ import org.toop.framework.networking.NetworkingClientManager;
|
||||
import org.toop.framework.networking.NetworkingInitializationException;
|
||||
|
||||
import javax.sound.sampled.*;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.NotDirectoryException;
|
||||
|
||||
public class Main {
|
||||
static void main(String[] args) throws IOException, UnsupportedAudioFileException, LineUnavailableException {
|
||||
initSystems();
|
||||
new EventFlow().addPostEvent(new AudioEvents.PlayAudio("mainmenu", true)).asyncPostEvent();
|
||||
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();
|
||||
|
||||
javax.swing.SwingUtilities.invokeLater(LocalServerSelector::new);
|
||||
}
|
||||
|
||||
private static void initSystems() throws NetworkingInitializationException, NotDirectoryException {
|
||||
new NetworkingClientManager();
|
||||
new SoundManager(new AudioFiles("app/src/main/resources/audio/"));
|
||||
}
|
||||
private static void initSystems() throws NetworkingInitializationException, NotDirectoryException {}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 956 B After Width: | Height: | Size: 956 B |
Reference in New Issue
Block a user