Minor changes

master
John 2022-06-07 14:55:59 -04:00
parent dcf245390d
commit cb6e8fcacf
3 changed files with 3 additions and 1 deletions

View File

@ -1,3 +1,4 @@
import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;

View File

@ -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--;
} }

View File

@ -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