Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/GamePanel.java
master
John 2022-06-20 11:33:34 -04:00
commit f91c7416ae
6 changed files with 39 additions and 13 deletions

View File

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

View File

@ -1,2 +1,2 @@
$Villain $Villain
I am having a seizure. I am having a seizure.

View File

@ -7,12 +7,12 @@ assssssd+ ad
asssssstwwwwww wwwww ww w wwe ad asssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssd asssssstwwwwww wwwww ww w wwe ad asssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssd
assssssssssssslllsssssllllssllslllssd zc asssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssd assssssssssssslllsssssllllssllslllssd zc asssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssd
asssssgxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc qe asssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssd asssssgxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc qe asssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssd
asssssd b ad asssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssd asssssd b ad asssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssd
asssssd b zc asssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssd asssssd b zc asssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssd
asssssd b asssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssd asssssd b asssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssd
asssssd !!!!!!!!!!!!!!!!!!!!!!!! b zxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxd asssssd !!!! b zxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxd
asssssdbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb d asssssdbbbbbbb +
asssssdbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb qe qe d asssssdbbbbbbb qe qe +
asssssd ak hk d asssssd ad ak +
asssssdo ad ! ! ad xd asssssdo ad ! hd +
assssstwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrtwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrtwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwc assssstwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrtwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrtwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwc

18
saves/Level4.txt Normal file
View File

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

View File

@ -293,7 +293,7 @@ public class GamePanel extends JPanel implements Runnable, KeyListener, Serializ
} }
} }
for(int i=0; i<fireballs.size(); i++){ 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); fireballs.get(i).draw(g);
} }
if(i<fireballs.size()&&fireballs.get(i).dead){ if(i<fireballs.size()&&fireballs.get(i).dead){
@ -440,7 +440,7 @@ public class GamePanel extends JPanel implements Runnable, KeyListener, Serializ
LevelManager.bombs = bombCount; LevelManager.bombs = bombCount;
} }
isLoaded = true; isLoaded = true;
//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. //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(); long lastTime = System.nanoTime();
double amountOfTicks = 60; double amountOfTicks = 60;
double ns = 1000000000/amountOfTicks; double ns = 1000000000/amountOfTicks;

View File

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