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) {
|
private Clip getClip(String sound) {
|
||||||
var soundBytes = this.soundData.get(sound);
|
var soundBytes = this.soundData.get(sound);
|
||||||
if (soundBytes == null) {
|
if (soundBytes == null) {
|
||||||
InputStream is = Client.class.getResourceAsStream("/sound/" + sound);
|
InputStream is = Client.class.getResourceAsStream("/nl/andrewlalis/aos_client/sound/" + sound);
|
||||||
if (is == null) {
|
if (is == null) {
|
||||||
System.err.println("Could not load sound: " + sound);
|
System.err.println("Could not load sound: " + sound);
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -16,7 +16,7 @@ public class GameFrame extends JFrame {
|
||||||
public GameFrame(String title, Client client, GamePanel gamePanel) throws HeadlessException {
|
public GameFrame(String title, Client client, GamePanel gamePanel) throws HeadlessException {
|
||||||
super(title);
|
super(title);
|
||||||
this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
|
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) {
|
if (iconInputStream != null) {
|
||||||
try {
|
try {
|
||||||
this.setIconImage(ImageIO.read(iconInputStream));
|
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>
|
<properties>
|
||||||
<maven.compiler.source>16</maven.compiler.source>
|
<maven.compiler.source>16</maven.compiler.source>
|
||||||
<maven.compiler.target>16</maven.compiler.target>
|
<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>
|
</properties>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -50,6 +50,7 @@ public class ClientHandler extends Thread {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void send(Message message) {
|
public void send(Message message) {
|
||||||
|
if (this.socket.isClosed()) return;
|
||||||
this.sendingQueue.submit(() -> {
|
this.sendingQueue.submit(() -> {
|
||||||
try {
|
try {
|
||||||
this.out.reset();
|
this.out.reset();
|
||||||
|
|
Loading…
Reference in New Issue