Moved resources and added package.bat for windows installer generation.
This commit is contained in:
parent
34dc31fbe6
commit
fa001996ff
|
@ -0,0 +1,9 @@
|
|||
cd target
|
||||
jpackage^
|
||||
--type exe^
|
||||
--name "Ace-of-Shades"^
|
||||
--description "Top-down 2D shooter game inspired by Ace of Spades."^
|
||||
--module-path "aos-client-3.1.jar;../../core/target/aos-core-3.1.jar"^
|
||||
--module aos_client/nl.andrewlalis.aos_client.Client^
|
||||
--win-shortcut^
|
||||
--win-dir-chooser
|
|
@ -21,7 +21,7 @@ public class SoundManager {
|
|||
private Clip getClip(String sound) {
|
||||
var soundBytes = this.soundData.get(sound);
|
||||
if (soundBytes == null) {
|
||||
InputStream is = Client.class.getResourceAsStream("/sound/" + sound);
|
||||
InputStream is = Client.class.getResourceAsStream("/nl/andrewlalis/aos_client/sound/" + sound);
|
||||
if (is == null) {
|
||||
System.err.println("Could not load sound: " + sound);
|
||||
return null;
|
||||
|
|
|
@ -16,7 +16,7 @@ public class GameFrame extends JFrame {
|
|||
public GameFrame(String title, Client client, GamePanel gamePanel) throws HeadlessException {
|
||||
super(title);
|
||||
this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
|
||||
InputStream iconInputStream = GameFrame.class.getClassLoader().getResourceAsStream("icon.png");
|
||||
InputStream iconInputStream = GameFrame.class.getClassLoader().getResourceAsStream("/nl/andrewlalis/aos_client/icon.png");
|
||||
if (iconInputStream != null) {
|
||||
try {
|
||||
this.setIconImage(ImageIO.read(iconInputStream));
|
||||
|
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
3
pom.xml
3
pom.xml
|
@ -17,6 +17,9 @@
|
|||
<properties>
|
||||
<maven.compiler.source>16</maven.compiler.source>
|
||||
<maven.compiler.target>16</maven.compiler.target>
|
||||
<maven.compiler.release>16</maven.compiler.release>
|
||||
<java.version>16</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -50,6 +50,7 @@ public class ClientHandler extends Thread {
|
|||
}
|
||||
|
||||
public void send(Message message) {
|
||||
if (this.socket.isClosed()) return;
|
||||
this.sendingQueue.submit(() -> {
|
||||
try {
|
||||
this.out.reset();
|
||||
|
|
Loading…
Reference in New Issue