Ejemplo n.º 1
0
 protected override bool DoUpdate(DriverUpdateParams param)
 {
     progress = Mathf.Clamp01(progress + param.deltaTime / duration);
     if (null != material)
     {
         material.color = Color.Lerp(runningColor.Key, runningColor.Value, progress);
     }
     return(1 > progress);
 }
Ejemplo n.º 2
0
 protected override bool DoUpdate(DriverUpdateParams param)
 {
     try
     {
         result.readLength += runningTaskParam.stream.Read(
             runningTaskParam.buffer,
             runningTaskParam.bufferOffset + result.readLength,
             Mathf.Min(partLength, runningTaskParam.length - result.readLength));
     }
     catch (IOException e)
     {
         result.exception = e;
         return(false);
     }
     return(result.readLength < runningTaskParam.length);
 }
Ejemplo n.º 3
0
 protected override bool DoUpdate(DriverUpdateParams param)
 {
     return(null == result.exception &&
            result.readLength < runningTaskParam.length);
 }