Newer
Older
JumpingGameOriginalSources / src / Move.java
k-fujii on 7 Dec 2021 414 bytes MapをPairクラスへ置換
import java.util.*;

public class Move {
	private Velocity velocity;
	private Pair<Double> move;
	public Move(Velocity velocity) {
		this.velocity = velocity;
	}
	public void moveX(double x) {
		this.move = new Pair<>(x, this.move.getSecond());
		velocity.updateMove(move);
	}
	public void moveY(double y) {
		this.move = new Pair<>(this.move.getFirst(), y);
	}
	public Pair<Double> getMove() {
		return move;
	}
}