示例#1
0
 public QueueScheduler(List <Job> jobs)
 {
     foreach (Job job in jobs)
     {
         AddJob(job);
     }
     run = (int executeTime) => {
         this.watch = Stopwatch.StartNew();
         while (watch.ElapsedMilliseconds < executeTime)
         {
             ;
         }
     };
 }
示例#2
0
    void Start()
    {
        var position = transform.position;

        _startPosition = position + Vector3.left * stichWidth;
        _endPosition   = position + Vector3.right * stichWidth;

        transform.position = _startPosition;

        _runMachine  = GetComponent <RunMachine>();
        threadPoints = new List <Vector3>
        {
            lineRenderer.transform.InverseTransformPoint(transform.position),
            lineRenderer.transform.InverseTransformPoint(transform.position)
        };
        lineRenderer.positionCount = 2;
        lineRenderer.SetPositions(threadPoints.ToArray());
    }