package net.northking.cctp.upperComputer.driver.ios.command.data;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public class DragXYData extends TapXYData {
    public int toX;

    public int toY;

    public double duration;

    public int getToX() {
        return toX;
    }

    public void setToX(int toX) {
        this.toX = toX;
    }

    public int getToY() {
        return toY;
    }

    public void setToY(int toY) {
        this.toY = toY;
    }

    public double getDuration() {
        return duration;
    }

    public void setDuration(double duration) {
        this.duration = duration;
    }

    @Override
    public void buildFromInput(DataInput dataInput) throws IOException {
        super.buildFromInput(dataInput);
        toX = dataInput.readInt();
        toY = dataInput.readInt();
        duration = dataInput.readDouble();
    }

    @Override
    public void encodeToOutput(DataOutput dataOutput) throws IOException {
        super.encodeToOutput(dataOutput);
        dataOutput.writeInt(toX);
        dataOutput.writeInt(toY);
        dataOutput.writeDouble(duration);
    }
}
