Fixed sprite paths

master
Aaron Johnon 1 year ago
parent db5e684b28
commit 6a3f43b435

@ -37,7 +37,7 @@ public class Player extends JPanel implements KeyListener, ActionListener {
private Timer shotTimer; //Player shot timer
public Player() {
ImageIcon icon = new ImageIcon("spr/tank1.png");
ImageIcon icon = new ImageIcon("src/spr/tank1.png");
sprite = icon.getImage();
setFocusable(true);
addKeyListener(this);

@ -12,7 +12,7 @@ public class PlayerBullet {
public PlayerBullet(int startX, int startY) {
this.x = startX;
this.y = startY;
ImageIcon icon = new ImageIcon("spr/bullet.png");
ImageIcon icon = new ImageIcon("src/spr/bullet.png");
sprite = icon.getImage();
}

@ -25,6 +25,8 @@ public class Main {
mainframe.add(playerPanel);
playerPanel.requestFocusInWindow();
mainframe.validate();
mainframe.repaint();
mainframe.setVisible(true);
}
}

Loading…
Cancel
Save