Fixed NPE when the default player.txt does not exist. Fixed bug when requesting PowerUp component of invalid length. Change default lives to 1.
This commit is contained in:
@@ -164,7 +164,7 @@ public class MarioComponent extends JComponent implements Runnable,
|
||||
}
|
||||
|
||||
public void run() {
|
||||
|
||||
//while (true) {
|
||||
graphicsConfiguration = getGraphicsConfiguration();
|
||||
|
||||
Art.init(graphicsConfiguration, sound);
|
||||
@@ -191,7 +191,7 @@ public class MarioComponent extends JComponent implements Runnable,
|
||||
Mario.fire = false;
|
||||
Mario.large = false;
|
||||
Mario.coins = 0;
|
||||
Mario.lives = 3;
|
||||
Mario.lives = 1;
|
||||
|
||||
randomLevel.init();
|
||||
randomLevel.setSound(sound);
|
||||
@@ -262,6 +262,7 @@ public class MarioComponent extends JComponent implements Runnable,
|
||||
}
|
||||
|
||||
Art.stopMusic();
|
||||
//}
|
||||
}
|
||||
|
||||
private void drawString(Graphics g, String text, int x, int y, int c) {
|
||||
|
||||
Reference in New Issue
Block a user