Update Info
This commit is contained in:
parent
a9341aa158
commit
257936c3c2
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -26,8 +26,8 @@ public class Play {
|
|||||||
//FIXME: Debug Use
|
//FIXME: Debug Use
|
||||||
//playGameMain("lvl1");
|
//playGameMain("lvl1");
|
||||||
|
|
||||||
|
initialGame();
|
||||||
//playJavaGame();
|
playJavaGame();
|
||||||
System.out.println("Java: Play Java Main Function Done");
|
System.out.println("Java: Play Java Main Function Done");
|
||||||
}
|
}
|
||||||
public static boolean initialGame(){
|
public static boolean initialGame(){
|
||||||
@ -37,7 +37,7 @@ public class Play {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static byte[] playJavaGame(){
|
public static byte[] playJavaGame(){
|
||||||
MarioGame game = new MarioGame();
|
|
||||||
game.setLives(3);
|
game.setLives(3);
|
||||||
String levelPath = "./levels/group0/lvl1.lvl"; // For local
|
String levelPath = "./levels/group0/lvl1.lvl"; // For local
|
||||||
String repPath = "./reps/f_l_sav.rep"; // For local
|
String repPath = "./reps/f_l_sav.rep"; // For local
|
||||||
|
@ -78,7 +78,7 @@ public class MarioRender extends JComponent implements FocusListener {
|
|||||||
}
|
}
|
||||||
if (!renderOcuppied){
|
if (!renderOcuppied){
|
||||||
//System.out.println(renderBuffer);
|
//System.out.println(renderBuffer);
|
||||||
if(world.deathBuffer > 999){
|
if(world.deathBuffer > 49){
|
||||||
renderBuffer = 100;
|
renderBuffer = 100;
|
||||||
}
|
}
|
||||||
if(renderBuffer>0){
|
if(renderBuffer>0){
|
||||||
@ -90,10 +90,6 @@ public class MarioRender extends JComponent implements FocusListener {
|
|||||||
renderBuffer--;
|
renderBuffer--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scale > 1) {
|
if (scale > 1) {
|
||||||
|
@ -43,8 +43,8 @@ public class Assets {
|
|||||||
|
|
||||||
private static Image getImage(GraphicsConfiguration gc, String imageName) throws IOException {
|
private static Image getImage(GraphicsConfiguration gc, String imageName) throws IOException {
|
||||||
//FIXME: web/local
|
//FIXME: web/local
|
||||||
//File file = new File(System.getProperty("user.dir") + "/img/" + imageName); // Local test
|
File file = new File(System.getProperty("user.dir") + "/img/" + imageName); // Local test
|
||||||
File file = new File("/app/img/" + imageName); // For web
|
//File file = new File("/app/img/" + imageName); // For web
|
||||||
BufferedImage source = ImageIO.read(file);
|
BufferedImage source = ImageIO.read(file);
|
||||||
Image image = gc.createCompatibleImage(source.getWidth(), source.getHeight(), Transparency.BITMASK);
|
Image image = gc.createCompatibleImage(source.getWidth(), source.getHeight(), Transparency.BITMASK);
|
||||||
Graphics2D g = (Graphics2D) image.getGraphics();
|
Graphics2D g = (Graphics2D) image.getGraphics();
|
||||||
|
Loading…
Reference in New Issue
Block a user