Commit 03f234d2 authored by Alexander Smith's avatar Alexander Smith
Browse files

playerX+playerY

parent 11e7c18b
......@@ -6,7 +6,7 @@ public class Entity {
public int worldX, worldY;
public int screenX, screenY;
public int playerX, playerY;
public int speed;
......
......@@ -23,8 +23,8 @@ public class Player extends Entity{
this.gp = gp;
this.keyH = keyH;
screenX = 480;
screenY = 515;
playerX = 480;
playerY = 515;
setDefaultValues();
......@@ -167,7 +167,7 @@ public class Player extends Entity{
break;
}
g2.drawImage(image, screenX, screenY, gp.tileSize, gp.tileSize, null);
g2.drawImage(image, playerX, playerY, gp.tileSize, gp.tileSize, null);
}
......
......@@ -100,8 +100,8 @@ public class TileLoader {
int WorldX = worldCol * gp.tileSize;
int WorldY = worldRow * gp.tileSize;
int screenX = WorldX - gp.player.worldX + gp.player.screenX;
int screenY = WorldY - gp.player.worldY + gp.player.screenY;
int screenX = WorldX - gp.player.worldX + gp.player.playerX;
int screenY = WorldY - gp.player.worldY + gp.player.playerY;
g2.drawImage(tiles[tileNum].image, screenX, screenY, gp.tileSize, gp.tileSize, null);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment