Update
parent
e698273bfa
commit
0f69b3595a
|
@ -11,8 +11,8 @@ sssssssssssssssssd llllll
|
||||||
sssssssssssssssssd l qwe qwe
|
sssssssssssssssssd l qwe qwe
|
||||||
sssssssssssssssssd asd asd
|
sssssssssssssssssd asd asd
|
||||||
sssssssssssssssssd bbb 1 zxc zxc
|
sssssssssssssssssd bbb 1 zxc zxc
|
||||||
sssssssssssssssssdbbbbbbbbbbbbbbbbbbbbbbb
|
sssssssssssssssssdbbbbbbbbb
|
||||||
sssssssssssssssssd qwwwwwwwwe
|
sssssssssssssssssd qwwwwwwwwe
|
||||||
sssssssssssssssssd qrsssssssstwe
|
sssssssssssssssssd qrsssssssstwe
|
||||||
sssssssssssssssssd bbb qwwrssssssssssstwe qwe +
|
sssssssssssssssssd bbb qwwrssssssssssstwe qwe +
|
||||||
ssssssssssssssssstwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrsssssssssssssssstwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrstwwwwww3
|
ssssssssssssssssstwwwwwwwwwwwwllllllllllllllllllllsssssssssssssssstwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwrstwwwwww3
|
|
@ -223,7 +223,7 @@ public class GamePanel extends JPanel implements Runnable, KeyListener{
|
||||||
} else {
|
} else {
|
||||||
filePath = "img/tiles/boxes/redSteel.png";
|
filePath = "img/tiles/boxes/redSteel.png";
|
||||||
}
|
}
|
||||||
double x = ((player.mouseX+camera.x) / Tile.length)*Tile.length;
|
double x = ((player.mouseX-(Tile.length/2)) / Tile.length)*Tile.length + (camera.x/Tile.length)*Tile.length;
|
||||||
double y = ((player.mouseY / Tile.length))*Tile.length;
|
double y = ((player.mouseY / Tile.length))*Tile.length;
|
||||||
g.drawImage(getImage(filePath),(int)x-camera.x+Tile.length/2+1,(int)y,Tile.length,Tile.length,null);
|
g.drawImage(getImage(filePath),(int)x-camera.x+Tile.length/2+1,(int)y,Tile.length,Tile.length,null);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue