was unnötiges entfernt
parent
c1bed58d46
commit
eb3829c966
BIN
bin/Player.class
BIN
bin/Player.class
Binary file not shown.
|
@ -216,19 +216,15 @@ public class Player extends Picture implements KeyListener { // extends Picture
|
||||||
if (coordinate == 'x') { // Auslesen der 'x' - Koordinate:
|
if (coordinate == 'x') { // Auslesen der 'x' - Koordinate:
|
||||||
if (left && dt != 0) {
|
if (left && dt != 0) {
|
||||||
xPos -= speed * dt;
|
xPos -= speed * dt;
|
||||||
System.out.println(speed * dt);
|
|
||||||
} else if (right && dt != 0) {
|
} else if (right && dt != 0) {
|
||||||
xPos += speed * dt;
|
xPos += speed * dt;
|
||||||
System.out.println(speed * dt);
|
|
||||||
}
|
}
|
||||||
return (int) xPos;
|
return (int) xPos;
|
||||||
} else if (coordinate == 'y') { // Auslesen der 'y' - Koordinate:
|
} else if (coordinate == 'y') { // Auslesen der 'y' - Koordinate:
|
||||||
if (down && dt != 0) {
|
if (down && dt != 0) {
|
||||||
yPos += speed * dt;
|
yPos += speed * dt;
|
||||||
System.out.println(speed * dt);
|
|
||||||
} else if (up && dt != 0) {
|
} else if (up && dt != 0) {
|
||||||
yPos -= speed * dt;
|
yPos -= speed * dt;
|
||||||
System.out.println(speed * dt);
|
|
||||||
}
|
}
|
||||||
return (int) yPos;
|
return (int) yPos;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue