Mit Sound zum testen noch keine Loop für die Hintergrund Musik
This commit is contained in:
1 parent
c53e9ef7e7
commit
031432f11b
3 files changed
+20
No files matched your search
@@ -0,0 +1,14 @@
|
||||
package de.heatup.audio;
|
||||
|
||||
public class SoundfileInvaders {
|
||||
private String path;
|
||||
|
||||
public SoundfileInvaders() {
|
||||
this.path = "src/de/heatup/resources/audio/" + "8bitinvaders.wav";
|
||||
}
|
||||
|
||||
public String getPath() {
|
||||
return this.path;
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
@@ -13,6 +13,8 @@ import java.awt.Point;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
import de.heatup.audio.AudioPlayer;
|
||||
import de.heatup.audio.SoundfileInvaders;
|
||||
import de.heatup.cfg.Config;
|
||||
import de.heatup.logging.Logger;
|
||||
import de.heatup.mapengine.CollisionHandler;
|
||||
@@ -126,6 +128,10 @@ public class Main extends JFrame implements Runnable {
|
||||
gamePanel.setVisible(true);
|
||||
actionPanel.setVisible(true);
|
||||
statusPanel.setVisible(true);
|
||||
|
||||
SoundfileInvaders bgsound = new SoundfileInvaders();
|
||||
AudioPlayer p = new AudioPlayer();
|
||||
p.play(bgsound.getPath());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user