Newer
Older
JumpingGame / src / main / java / entities / Force.java
okina-kina on 19 Apr 2022 368 bytes バグ修正
package entities;

public class Force {
	private Acceleration acceleration;
	private Pair<Double> value = new Pair<>(0.0,0.0);
	public Force(Acceleration acceleration) {
		this.acceleration = acceleration;
	}
	public void gravity(double y) {
		this.value = new Pair<>(0.0,y);
		acceleration.updateForce(value);
	}
	public Pair<Double> getValue() {
		return value;
	}
}