Skip to content
Snippets Groups Projects
Commit feb7c447 authored by Azurlors's avatar Azurlors
Browse files

petit changement cam

parent 0fff33bf
Branches
No related tags found
No related merge requests found
......@@ -32,19 +32,16 @@ public class Painter implements GamePainter{
private static Coordonnees coordonneesCam;
public int xCam;
public int zCam;
private int decalage = 225;
private int decalage = 255; // decalage Cam bas pour perso
private Painter painter;
public Painter() {
}
@Override
public void draw(BufferedImage im) {
coordonneesCam = gameCharacter.getCoord();
xCam = -WIDTH/2 + (int) coordonneesCam.getX();
zCam = -HEIGHT/2 +(int) coordonneesCam.getZ()-decalage;
cameraUse();
Graphics2D crayon = (Graphics2D) im.getGraphics();
crayon.setColor(Color.blue);
......@@ -199,6 +196,12 @@ public class Painter implements GamePainter{
}
}
private void cameraUse(){
coordonneesCam = gameCharacter.getCoord();
xCam = -WIDTH/2 + (int) coordonneesCam.getX();
zCam = -HEIGHT/2 +(int) coordonneesCam.getZ()-decalage;
}
@Override
public int getWidth() {
return WIDTH;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment