Minor changes
parent
dcf245390d
commit
cb6e8fcacf
|
@ -1,3 +1,4 @@
|
||||||
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ public class MenuPanel extends JPanel implements Runnable, KeyListener{
|
||||||
|
|
||||||
public JPanel gameFrame;
|
public JPanel gameFrame;
|
||||||
|
|
||||||
|
public static Camera camera = new Camera(0);
|
||||||
public Thread gameThread;
|
public Thread gameThread;
|
||||||
public Image image;
|
public Image image;
|
||||||
public Graphics graphics;
|
public Graphics graphics;
|
||||||
|
@ -117,6 +118,7 @@ public class MenuPanel extends JPanel implements Runnable, KeyListener{
|
||||||
//only move objects around and update screen if enough time has passed
|
//only move objects around and update screen if enough time has passed
|
||||||
if(delta >= 1){
|
if(delta >= 1){
|
||||||
move();
|
move();
|
||||||
|
camera.x += 10;
|
||||||
repaint();
|
repaint();
|
||||||
delta--;
|
delta--;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,6 @@ public class TextBox extends Rectangle {
|
||||||
newY = y + (metrics.getAscent() - metrics.getDescent())/2;
|
newY = y + (metrics.getAscent() - metrics.getDescent())/2;
|
||||||
// draw centered string
|
// draw centered string
|
||||||
g.drawString(text, newX, newY);
|
g.drawString(text, newX, newY);
|
||||||
System.out.println(newX + " " + y + " " + newY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: make this good
|
// TODO: make this good
|
||||||
|
|
Loading…
Reference in New Issue