Fixing bugs

master
bob 2022-06-20 11:29:54 -04:00
parent d6729e3481
commit 341f26b6bb
6 changed files with 39 additions and 12 deletions

View File

@ -11,7 +11,7 @@
3430 500 Click left to throw a bomb You have a limited amount of bombs per level!
2950 550 you can blow up boxes
500 200 Press WASD to move and R to restart
500 250 D makes you fall down faster
500 250 S makes you fall down faster
4250 100 You can pickup/placedown steel using right click
4250 150 Hold right click to see your pickup/placedown range
4250 200 You can't jump or throw bombs while while holding steel

View File

@ -10,9 +10,9 @@ asssssgxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc qe
asssssd b ad asssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssd
asssssd b zc asssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssd
asssssd b asssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssd
asssssd !!!!!!!!!!!!!!!!!!!!!!!! b zxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxd
asssssdbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb d
asssssdbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb qe qe d
asssssd ak hk d
asssssdo ad ! ! ad xd
asssssd !!!! b zxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxd
asssssdbbbbbbb +
asssssdbbbbbbb qe qe +
asssssd ad ak +
asssssdo ad ! hd +
assssstwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrtwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrtwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwc

18
saves/Level4.txt Normal file
View File

@ -0,0 +1,18 @@
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww

View File

@ -290,7 +290,7 @@ public class GamePanel extends JPanel implements Runnable, KeyListener, Serializ
}
}
for(int i=0; i<fireballs.size(); i++){
if(fireballs.get(i)!=null) {
if(fireballs.get(i)!=null&&fireballs.get(i).canUpdate(0,0)) {
fireballs.get(i).draw(g);
}
if(i<fireballs.size()&&fireballs.get(i).dead){
@ -433,6 +433,7 @@ public class GamePanel extends JPanel implements Runnable, KeyListener, Serializ
} else {
LevelManager.bombs = bombCount;
}
//System.out.println("done111");
//the CPU runs our game code too quickly - we need to slow it down! The following lines of code "force" the computer to get stuck in a loop for short intervals between calling other methods to update the screen.
long lastTime = System.nanoTime();
double amountOfTicks = 60;

View File

@ -38,7 +38,13 @@ public class LevelManager implements Serializable {
xSpawn = -800;
ySpawn = 100;
filePath = "saves/Level3.txt";
bombs = 99329;
bombs = 4;
} else if(level == 4){
//-800/100
xSpawn = -800;
ySpawn = 100;
filePath = "saves/Level4.txt";
bombs = 4;
}
try {
MapReader.inputMap(filePath);
@ -75,6 +81,7 @@ public class LevelManager implements Serializable {
throw new RuntimeException(e);
}
//GamePanel.player.reset();
//System.out.println("done111");
}
public static void setLevel(int level) {
@ -82,5 +89,6 @@ public class LevelManager implements Serializable {
}
public static void nextLevel(){
setLevel(level+1);
System.out.println("done222");
}
}