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

import java.util.*;

public class Move {
	private Velocity velocity;
	private Pair<Double> value = new Pair<>(0.0,0.0);
	public Move(Velocity velocity) {
		this.velocity = velocity;
	}
	public void moveY(double y) {
		this.value = new Pair<>(this.value.getLeft(),y);
		velocity.updateMove(value);
	}
	public void moveX(double x) {
		this.value = new Pair<>(x,this.value.getRight());
		velocity.updateMove(value);
	}
	public Pair<Double> getValue() {
		return value;
	}
}