Color Strike toegevoegt

This commit is contained in:
Daniel
2015-05-29 18:41:31 +02:00
parent 7251d919ae
commit 50e2ea18dc
4 changed files with 9 additions and 7 deletions
+2 -1
View File
@@ -21,6 +21,7 @@ public class Images{
images.add(ImageIO.read(Main.class.getResource("/image/player.png")));
images.add(ImageIO.read(Main.class.getResource("/image/player2.png")));
images.add(ImageIO.read(Main.class.getResource("/image/pressstart.png")));
images.add(ImageIO.read(Main.class.getResource("/image/colorstrike.png")));
}catch(IOException e){
e.printStackTrace();
@@ -34,6 +35,6 @@ public class Images{
public enum ImageType
{
player,player2, pressstart
player,player2, pressstart, colorstrike
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

+7 -6
View File
@@ -14,7 +14,9 @@ import control.joystick.JoystickEvent;
public class MenuState extends GameState {
BufferedImage PressStart = Images.getImage(ImageType.pressstart);
BufferedImage pressStart = Images.getImage(ImageType.pressstart);
BufferedImage colorStrike = Images.getImage(ImageType.colorstrike);
int index = 0;
int varx = 0;
int x,y,frame = 0,maxFrames = 5;
@@ -53,8 +55,11 @@ public class MenuState extends GameState {
g2.translate(1280/2, 1024/2);
BufferedImage subImg = PressStart.getSubimage(x, y, 49, 26);
BufferedImage subImg = pressStart.getSubimage(x, y, 49, 26);
g2.drawImage(subImg, varx - 26*5, 0 - 20*5, 49*5, 26*5, null);
BufferedImage subImg2 = colorStrike;
g2.drawImage(subImg2, 0 -27*8 , 0 -300, 54*8, 18*8, null);
varx+=0;
@@ -63,10 +68,6 @@ public class MenuState extends GameState {
g2.setColor(Color.WHITE);
g2.drawString("Copyright 2015 by Daniel Compagner", -180, 500);
Font cSFont = new Font("OCR A Extended", Font.BOLD, 100);
g2.setFont(cSFont);
g2.setColor(Color.GREEN);
g2.drawString("Color Strike", -500, 0);
}
@Override