Newer
Older
JumpingGame / src / main / java / resources / Force.java
  1. package resources;
  2.  
  3. public class Force {
  4. private Acceleration acceleration;
  5. private Pair<Double> value;
  6.  
  7. public Force(Acceleration acceleration) {
  8. this.acceleration = acceleration;
  9. }
  10.  
  11. public void gravity(double y) {
  12. this.value = new Pair(0.0, y);
  13. acceleration.updateByForce(value);
  14. }
  15.  
  16. public Pair getValue() {
  17. return value;
  18. }
  19. }