mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 08:39:45 +02:00
Mit Sound zum testen noch keine Loop für die Hintergrund Musik
This commit is contained in:
@@ -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