Merge remote-tracking branch 'origin/master'

master
John 2022-06-17 13:55:32 -04:00
commit 5080aeb539
5 changed files with 28 additions and 2 deletions

View File

@ -12,7 +12,7 @@ sssssssssssssssssd
sssssssssssssssssd zxc asd asd zxxxxxc zxxxxxxxllllxxxxxxxxc ad sssssssssssssssssd zxc asd asd zxxxxxc zxxxxxxxllllxxxxxxxxc ad
sssssssssssssssssd 1 zxc zxc vvvvvvvvwwwwvvvvvvvvv ad sssssssssssssssssd 1 zxc zxc vvvvvvvvwwwwvvvvvvvvv ad
sssssssssssssssssd qe vvvvvvvvvvvvvvvvvvvvv ad sssssssssssssssssd qe vvvvvvvvvvvvvvvvvvvvv ad
sssssssssssssssssdlllllad 2 qwwwwwwwwe vvvvvvvvvvvvvvvvvvvvv ad sssssssssssssssssdlllllad 2 hqwwwwwwwwe vvvvvvvvvvvvvvvvvvvvv ad
sssssssssssssssssdlllllad bbb s qrsssslssstwe vvvvvvvvvvvvvvvvvvvvv ad sssssssssssssssssdlllllad bbb s qrsssslssstwe vvvvvvvvvvvvvvvvvvvvv ad
sssssssssssssssssdllllladbb s ooqwwrssssllssssstwe !!! qwe vvvvvvvvvvvvvvvvvvvvv + ad sssssssssssssssssdllllladbb s ooqwwrssssllssssstwe !!! qwe vvvvvvvvvvvvvvvvvvvvv + ad
ssssssssssssssssstwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrsssssssssssssssstwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrstwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww3 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<Middleware> middlewareArray = new ArrayList<Middleware>();
public ArrayList<Tile>particleTiles = new ArrayList<Tile>(); public ArrayList<Tile>particleTiles = new ArrayList<Tile>();
public ArrayList<Tile>shootingTiles = new ArrayList<Tile>();
public ArrayList<NonPlayer>enemy = new ArrayList<NonPlayer>(); public ArrayList<NonPlayer>enemy = new ArrayList<NonPlayer>();
public ArrayList<StickyBomb>bombs = new ArrayList<>(); public ArrayList<StickyBomb>bombs = new ArrayList<>();
public BombDirectionShow bombDir = null; public BombDirectionShow bombDir = null;

View File

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

View File

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