Browse Source

update

main
fdai4616 2 years ago
parent
commit
4acc547bae
  1. 7
      src/main/java/PingPong/Paddle.java

7
src/main/java/PingPong/Paddle.java

@ -31,7 +31,11 @@ public class Paddle extends Rectangle {
} }
public void move() { public void move() {
}
y1 += yVelocity1;
y2 += yVelocity2;
}
public void setYDirection(int yDirection, int paddleId) { public void setYDirection(int yDirection, int paddleId) {
if (paddleId == 1) { if (paddleId == 1) {
@ -40,4 +44,5 @@ public class Paddle extends Rectangle {
yVelocity2 = yDirection; yVelocity2 = yDirection;
} }
} }
} }
Loading…
Cancel
Save