Minor changes

master
John 2022-06-20 14:48:56 -04:00
parent bc7dfd982a
commit a8b45c35ba
2 changed files with 5 additions and 3 deletions

View File

@ -66,7 +66,7 @@ public class GamePanel extends JPanel implements Runnable, KeyListener, Serializ
public BufferedImageWrapper[][][] slimeSpriteArray = new BufferedImageWrapper[2][2][3];
public BufferedImageWrapper[] explosionArray = new BufferedImageWrapper[9];
public Tile[][]map = new Tile[1000][18];
public Tile[][]map;
public ArrayList<Middleware> middlewareArray = new ArrayList<>();
public ArrayList<Tile>particleTiles = new ArrayList<>();
@ -87,6 +87,7 @@ public class GamePanel extends JPanel implements Runnable, KeyListener, Serializ
public BufferedImageWrapper cloud3 = new BufferedImageWrapper(("img/backgrounds/cloud3.png"));
public BufferedImageWrapper bomb;
public BufferedImageWrapper narratorPortrait = new BufferedImageWrapper(("img/dialogue/Gunther.png"));
public BufferedImageWrapper villainPortrait = new BufferedImageWrapper("img/dialogue/Bouncer.png");
public boolean isContinue;
public boolean isRunning;
public ArrayList<WallSign> tutorialSign = new ArrayList<WallSign>();
@ -98,6 +99,8 @@ public class GamePanel extends JPanel implements Runnable, KeyListener, Serializ
// set gameFrame to enable switching between different panels (in the gameFrame)
this.gameFrame = gameFrame;
camera = new Camera(0);
// initialize map
map = new Tile[1000][18];
// create background mountains and images
background = new BackgroundImage(0, 0, backgroundImage, GAME_WIDTH, GAME_HEIGHT, 10, camera);
cloudOneBackground = new BackgroundImage(200, 200, cloud1, cloud1.image.getWidth(), cloud1.image.getHeight(), 5, camera);

View File

@ -51,8 +51,7 @@ public class LevelManager implements Serializable {
if (GameFrame.game.dialogueArray.get(0).contains("$Villain")) {
GameFrame.game.dialogueArray.remove(0);
GameFrame.game.dialogueMenu.isNarrator = false;
// TODO: move img path to GamePanel
GameFrame.game.dialogueMenu.PORTRAIT = new BufferedImageWrapper("img\\dialogue\\Bouncer.png");
GameFrame.game.dialogueMenu.PORTRAIT = GameFrame.game.villainPortrait;
}
GameFrame.game.dialogueMenu.currentFrame = 0;
GameFrame.game.dialogueMenu.frameCounter = 0;