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

public class Force {
    private Acceleration acceleration;
    private Vector2 value;

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

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

    public Vector2 getValue() {
        return value;
    }
}