Added Backgrounds
This commit is contained in:
parent
40657262a7
commit
992fdb997d
BIN
src/com/sagi/dayan/Games/Images/L2-BG.jpg
Normal file
BIN
src/com/sagi/dayan/Games/Images/L2-BG.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 MiB |
BIN
src/com/sagi/dayan/Games/Images/L3-BG.jpg
Normal file
BIN
src/com/sagi/dayan/Games/Images/L3-BG.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 MiB |
BIN
src/com/sagi/dayan/Games/Images/L4-BG.jpg
Normal file
BIN
src/com/sagi/dayan/Games/Images/L4-BG.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2 MiB |
BIN
src/com/sagi/dayan/Games/Images/L5-BG.jpg
Normal file
BIN
src/com/sagi/dayan/Games/Images/L5-BG.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 MiB |
|
@ -10,6 +10,7 @@ import java.awt.image.BufferedImage;
|
|||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.Vector;
|
||||
|
||||
import javax.swing.JLabel;
|
||||
|
@ -65,7 +66,9 @@ public abstract class Level extends Scene {
|
|||
keys = new HashMap<>();
|
||||
yAxisStartingAnimation = new int[]{height + (5*GameEngine.PLAYER_HEIGHT) , height - (4*GameEngine.PLAYER_HEIGHT) , height - (GameEngine.PLAYER_HEIGHT + 15)};
|
||||
startingAnimationIndex = 0;
|
||||
bg = new Background(0,0,width,height, 1, "L1-BG.jpg", 0,1000, 4760);
|
||||
Random r = new Random();
|
||||
int bgIndex = r.nextInt(5) + 1;
|
||||
bg = new Background(0,0,width,height, 1, "L"+bgIndex+"-BG.jpg", 0,1000, 4760);
|
||||
this.numOfPlayers = numOfPlayers;
|
||||
this.title = stageTitle;
|
||||
this.stageTitle = new JLabel(this.title);
|
||||
|
|
Loading…
Reference in a new issue