package resources; public class Move { private Velocity velocity; private Vector2 value; public Move(Velocity velocity) { this.velocity = velocity; } public void moveX(double x) { this.value = new Vector2(x, this.value.getY()); velocity.updateByMove(value); } public void moveY(double y) { this.value = new Vector2(this.value.getX(), y); } public Vector2 getValue() { return value; } }