Starting to add fireball blocks

master
bob 2022-06-17 13:50:22 -04:00
parent 1d13e661ad
commit 0f254b4607
5 changed files with 28 additions and 2 deletions

View File

@ -12,7 +12,7 @@ sssssssssssssssssd
sssssssssssssssssd zxc asd asd zxxxxxc zxxxxxxxllllxxxxxxxxc ad
sssssssssssssssssd 1 zxc zxc vvvvvvvvwwwwvvvvvvvvv ad
sssssssssssssssssd qe vvvvvvvvvvvvvvvvvvvvv ad
sssssssssssssssssdlllllad 2 qwwwwwwwwe vvvvvvvvvvvvvvvvvvvvv ad
sssssssssssssssssdlllllad 2 hqwwwwwwwwe vvvvvvvvvvvvvvvvvvvvv ad
sssssssssssssssssdlllllad bbb s qrsssslssstwe vvvvvvvvvvvvvvvvvvvvv ad
sssssssssssssssssdllllladbb s ooqwwrssssllssssstwe !!! qwe vvvvvvvvvvvvvvvvvvvvv + ad
ssssssssssssssssstwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrsssssssssssssssstwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrstwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww3

14
src/FireBall.java Normal file
View File

@ -0,0 +1,14 @@
import java.awt.*;
public class FireBall extends GenericSprite{
public FireBall(int x, int y, int height, int width, int xv, int yv) {
super(x, y, height, width);
xVelocity = xv;
yVelocity = yv;
}
public void draw(Graphics g){
}
}

View File

@ -59,6 +59,8 @@ public class GamePanel extends JPanel implements Runnable, KeyListener, Serializ
public ArrayList<Middleware> middlewareArray = new ArrayList<Middleware>();
public ArrayList<Tile>particleTiles = new ArrayList<Tile>();
public ArrayList<Tile>shootingTiles = new ArrayList<Tile>();
public ArrayList<NonPlayer>enemy = new ArrayList<NonPlayer>();
public ArrayList<StickyBomb>bombs = new ArrayList<>();
public BombDirectionShow bombDir = null;

View File

@ -22,12 +22,15 @@ public class MapReader implements Serializable {
Grass:
*/
//o = steel
// u
// h k Shooting
// m
public static void inputMap(String filePath) throws IOException, SpriteException, UnsupportedAudioFileException, LineUnavailableException {
x = 0;
y = 0;
GameFrame.game.enemy.clear();
GameFrame.game.particleTiles.clear();
GameFrame.game.shootingTiles.clear();
for(int i=0; i<GameFrame.game.map.length; i++){
Arrays.fill(GameFrame.game.map[i], null);
}
@ -98,6 +101,10 @@ public class MapReader implements Serializable {
} else if(file.charAt(i)=='o'){
newTile("img/tiles/boxes/steel.png");
GameFrame.game.map[x][y].movable = true;
} else if(file.charAt(i)=='h'){
newTile("img/tiles/boxes/boxCoin.png");
GameFrame.game.map[x][y].shootingDir = "left";
GameFrame.game.shootingTiles.add(GameFrame.game.map[x][y]);
}
x+=1;
}

View File

@ -22,6 +22,8 @@ public class Tile implements Serializable {
public boolean replaceAble;
public Tile previousBlock;
public String shootingDir;
public Tile(int x, int y){
isFinish = false;
collision = true;
@ -33,6 +35,7 @@ public class Tile implements Serializable {
movable = false;
replaceAble = false;
previousBlock = null;
shootingDir = "none";
}
public void update(){
realX = x-GameFrame.game.camera.x;