Newer
Older
JumpingGame / src / main / java / resources / Force.java
package resources;

public class Force {
    private Acceleration acceleration;
    private Pair<Double> value;

    public Force(Acceleration acceleration) {
        this.acceleration = acceleration;
    }

    public void gravity(double y) {
        this.value = new Pair(0.0, y);
        acceleration.updateByForce(value);
    }

    public Pair getValue() {
        return value;
    }
}