Only top lava gives particles

master
bob 2022-06-09 13:05:42 -04:00
parent b307fe06a2
commit 5c5ccc5188
4 changed files with 16 additions and 6 deletions

View File

@ -9,8 +9,8 @@ sssssssssssssssssd
sssssssssssssssssd qe qe
sssssssssssssssssd ad ! ad
sssssssssssssssssd qwe qwe atwwwrd qwwwwwwellllqwwwwwwwe
sssssssssssssssssd asd asd zxxxxxc zxxxxxxxwwwwxxxxxxxxc
sssssssssssssssssd 1 zxc zxc vvvvvvvvvvvvvvvvvvvvv
sssssssssssssssssd asd asd zxxxxxc zxxxxxxxllllxxxxxxxxc
sssssssssssssssssd 1 zxc zxc vvvvvvvvwwwwvvvvvvvvv
sssssssssssssssssd qe vvvvvvvvvvvvvvvvvvvvv
sssssssssssssssssd ad qwwwwwwwwe vvvvvvvvvvvvvvvvvvvvv
sssssssssssssssssd ad qrsssssssstwe vvvvvvvvvvvvvvvvvvvvv

View File

@ -6,9 +6,9 @@ sssssssssssssssssd
sssssssssssssssssd 1 1 1 1 1
sssssssssssssssssd 1
sssssssssssssssssd
sssssssssssssssssd
sssssssssssssssssd
sssssssssssssssssd qwe qwe
sssssssssssssssssd ll
sssssssssssssssssd llllll
sssssssssssssssssd l qwe qwe
sssssssssssssssssd asd asd
sssssssssssssssssd bbb 1 zxc zxc
sssssssssssssssssdbbbbbbbbbbbbbbbbbbbbbbb

View File

@ -91,8 +91,10 @@ public class MapReader {
} else if(file.charAt(i)=='l'){
newTile("img/tiles/terrain/lava.png");
GamePanel.map[x][y].kills = true;
if(y>0&&GamePanel.map[x][y-1]==null) {
GamePanel.particleTiles.add(GamePanel.map[x][y]);
}
}
x+=1;
}
}

View File

@ -51,6 +51,14 @@ public class StickyBomb extends GenericSprite{
}
GamePanel.player.capSpeed();
alive = false;
for(int i=0; i<GamePanel.enemy.size(); i++){
double disX = GamePanel.enemy.get(i).x+GamePanel.enemy.get(i).npcWidth/2 - (x+length/2);
double disY = GamePanel.enemy.get(i).y+GamePanel.enemy.get(i).npcHeight/2 - (y+length/2);
double eHypo = Math.sqrt(disX*disX+disY*disY);
if(eHypo<200){
GamePanel.enemy.remove(i);
}
}
}
public void move(){
update();