Newer
Older
JumpingGame / src / main / java / entities / Onground.java
package entities;

import java.util.*;

public class Onground {
	private boolean ground = true;
	private Pair<Double> position = new Pair<>(0.0,0.0);
	private boolean value = true;
	public void updateGround(boolean ground) {
		this.ground = ground;
		value = ((ground==true)&&(position.getRight()<=0.0));
	}
	public void updatePosition(Pair<Double> position) {
		this.position = position;
		value = ((ground==true)&&(position.getRight()<=0.0));
	}
	public boolean getValue() {
		return value;
	}
}