package resources;
public class Position {
private Ground ground;
private Vector2 value;
public void updateByVelocity(Vector2 velocity) {
Vector2 temp_l3;
if (((this.ground.getValue() == true) && ((this.value.getY() + (0.01 * velocity.getY())) < 0.0))) {
temp_l3 = new Vector2((this.value.getX() + (0.01 * velocity.getX())), 0.0);
} else {
temp_l3 = new Vector2((this.value.getX() + (0.01 * velocity.getX())), (this.value.getY() + (0.01 * velocity.getY())));
}
value = temp_l3;
}
public Position(Ground ground) {
this.ground = ground;
}
public Vector2 getValue() {
return value;
}
}