implemented camera
This commit is contained in:
@@ -16,8 +16,14 @@ public class GamePanel extends JPanel implements Runnable {
|
||||
// 4:3 ratio
|
||||
public final int maxScreenCol = 16;
|
||||
public final int maxScreenRow = 12;
|
||||
final int screenWidth = tileSize * maxScreenCol; // 768 pixels
|
||||
final int screenHeight = tileSize * maxScreenRow; // 576 pixels
|
||||
public final int screenWidth = tileSize * maxScreenCol; // 768 pixels
|
||||
public final int screenHeight = tileSize * maxScreenRow; // 576 pixels
|
||||
|
||||
// WORLD SETTINGS
|
||||
public final int maxWorldCol = 50;
|
||||
public final int maxWorldRow = 50;
|
||||
public final int worldWidth = tileSize * maxWorldCol;
|
||||
public final int worldHeight = tileSize * maxWorldRow;
|
||||
|
||||
//FPS
|
||||
int FPS = 60;
|
||||
@@ -25,7 +31,7 @@ public class GamePanel extends JPanel implements Runnable {
|
||||
TileManager tileM = new TileManager(this);
|
||||
KeyHandler keyH = new KeyHandler();
|
||||
Thread gameThread;
|
||||
Player player = new Player(this, keyH);
|
||||
public Player player = new Player(this, keyH);
|
||||
|
||||
public GamePanel() {
|
||||
this.setPreferredSize(new Dimension(screenWidth, screenHeight));
|
||||
|
||||
Reference in New Issue
Block a user