void Start() { offset = 8; axisMove = MoveInAxis.Z;//if not set by setAxisMove then it will default to Z. setOriginalPos(); currentPos = originalPos; targetPos = originalPos + offset; delay = 2; targetReached = false; moveRate = 0.4f * Time.fixedDeltaTime; target = null; }
public void setAxisMove(MoveInAxis _movAxis) { axisMove = _movAxis; }