add start image

This commit is contained in:
2026-04-19 12:03:15 -05:00
parent a211a10778
commit d776600c37
2 changed files with 3 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ public class Platformer extends JPanel implements KeyListener, ActionListener{
boolean allCollected;
boolean gameOver;
boolean gameStarted;
Image heart,emptyHeart,slash,amendmentImg,powerImg,pressRImg,startImg,endImg,winImg;
Image heart,emptyHeart,slash,amendmentImg,powerImg,pressRImg,endImg,winImg,titleImg;
ArrayList<Image> numbers;
@@ -63,8 +63,8 @@ public class Platformer extends JPanel implements KeyListener, ActionListener{
//setup objects
heart = new ImageIcon("Sprites/Hearts/heart.png").getImage();
titleImg = new ImageIcon("Sprites/Title.png").getImage();
emptyHeart = new ImageIcon("Sprites/Hearts/emptyHeart.png").getImage();
startImg = new ImageIcon("Sprites/start.png").getImage();
endImg = new ImageIcon("Sprites/end.png").getImage();
pressRImg = new ImageIcon("Sprites/PressR.png").getImage();
winImg = new ImageIcon("Sprites/win.png").getImage();
@@ -369,7 +369,7 @@ public class Platformer extends JPanel implements KeyListener, ActionListener{
else if (curTime >= modAmt*3/4 && curTime <= modAmt-1) startTime = 3;
if (currentLevel == 0){
g.drawImage(startImg,340,300,null);
g.drawImage(titleImg, boardWidth/2 - 150, boardHeight/2 - 200, null);
String text = "Press P to Start!";
int xBase = 340;

BIN
Sprites/Title.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB