Added Lava
parent
8f3f35a4af
commit
d5bf288c26
Binary file not shown.
After Width: | Height: | Size: 937 B |
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
|
@ -4,15 +4,15 @@ sssssssssssssssssd 1
|
|||
sssssssssssssssssd
|
||||
sssssssssssssssssd
|
||||
sssssssssssssssssd 1 1 1 1 1
|
||||
sssssssssssssssssd w 1
|
||||
sssssssssssssssssd w
|
||||
sssssssssssssssssd w qe qe
|
||||
sssssssssssssssssd w ad ! ad
|
||||
sssssssssssssssssd w qwe qwe atwwwrd
|
||||
sssssssssssssssssd w asd asd zxxxxxc
|
||||
sssssssssssssssssd w 1 zxc zxc
|
||||
sssssssssssssssssd qe
|
||||
sssssssssssssssssd ad qwwwwwwwwe
|
||||
sssssssssssssssssd ad qrsssssssstwe
|
||||
sssssssssssssssssd ad qwwrssssssssssstwe !!! qwe +
|
||||
ssssssssssssssssstwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrsssssssssssssssstwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrstwwwwww3
|
||||
sssssssssssssssssd 1
|
||||
sssssssssssssssssd
|
||||
sssssssssssssssssd qe qe
|
||||
sssssssssssssssssd ad ! ad
|
||||
sssssssssssssssssd qwe qwe atwwwrd qwwwwwwellllqwwwwwwwe
|
||||
sssssssssssssssssd asd asd zxxxxxc zxxxxxxxwwwwxxxxxxxxc
|
||||
sssssssssssssssssd 1 zxc zxc vvvvvvvvvvvvvvvvvvvvv
|
||||
sssssssssssssssssd qe vvvvvvvvvvvvvvvvvvvvv
|
||||
sssssssssssssssssd ad qwwwwwwwwe vvvvvvvvvvvvvvvvvvvvv
|
||||
sssssssssssssssssd ad qrsssssssstwe vvvvvvvvvvvvvvvvvvvvv
|
||||
sssssssssssssssssd ad qwwrssssssssssstwe !!! qwe vvvvvvvvvvvvvvvvvvvvv +
|
||||
ssssssssssssssssstwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrsssssssssssssssstwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrstwwwwwwwwwwwwwwwwwwwwwwwwwwwwww3
|
|
@ -20,6 +20,7 @@ public class MapReader {
|
|||
asd
|
||||
zxc
|
||||
!: Slime
|
||||
v= background
|
||||
Grass:
|
||||
*/
|
||||
|
||||
|
@ -83,6 +84,12 @@ public class MapReader {
|
|||
} else if(file.charAt(i)=='+') {
|
||||
newTile("img/tiles/boxes/finish.png");
|
||||
GamePanel.map[x][y].isFinish = true;
|
||||
} else if(file.charAt(i)=='v'){
|
||||
newTile("img/tiles/background/wall.png");
|
||||
GamePanel.map[x][y].collision = false;
|
||||
} else if(file.charAt(i)=='l'){
|
||||
newTile("img/tiles/terrain/lava.png");
|
||||
GamePanel.map[x][y].kills = true;
|
||||
}
|
||||
x+=1;
|
||||
}
|
||||
|
|
|
@ -101,6 +101,10 @@ public class Player extends GenericSprite {
|
|||
LevelManager.nextLevel();
|
||||
return true;
|
||||
}
|
||||
if (GamePanel.map[i][j].kills) {
|
||||
GamePanel.player.reset();
|
||||
return true;
|
||||
}
|
||||
canUpdate = false;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -31,14 +31,14 @@ public class StickyBomb extends GenericSprite{
|
|||
}
|
||||
|
||||
public void explode(){
|
||||
double yDis = GamePanel.player.y+Player.PLAYER_HEIGHT/2-(y+length/2);
|
||||
double xDis = GamePanel.player.x+Player.PLAYER_HEIGHT/2-(realX+length/2);
|
||||
double yDis = GamePanel.player.y+Player.PLAYER_HEIGHT/2-(y+(double)length/2);
|
||||
double xDis = GamePanel.player.x+Player.PLAYER_HEIGHT/2-(realX+(double)length/2);
|
||||
double hypo = Math.sqrt(yDis*yDis+xDis+xDis);
|
||||
if(yDis!=0){
|
||||
GamePanel.player.yVelocity = 10000/(yDis*hypo);
|
||||
GamePanel.player.yVelocity += 10000/(yDis*hypo);
|
||||
}
|
||||
if(xDis!=0) {
|
||||
GamePanel.player.xVelocity = 100000/(xDis*hypo);
|
||||
GamePanel.player.xVelocity += 100000/(xDis*hypo);
|
||||
}
|
||||
GamePanel.player.capSpeed();
|
||||
alive = false;
|
||||
|
|
|
@ -8,11 +8,14 @@ public class Tile {
|
|||
public boolean collision;
|
||||
|
||||
public boolean isFinish;
|
||||
|
||||
public boolean kills;
|
||||
public int realX;
|
||||
public static final int length = 35;
|
||||
public Tile(int x, int y){
|
||||
isFinish = false;
|
||||
collision = true;
|
||||
kills = false;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue