Job.Start C# (CSharp) Method

Start() public method

public Start ( ) : void
return void
    void Start()
    {
        moveController = GetComponent<MoveController>();
          s1_CD = s2_CD = 3;
          s3_CD = 5;
          s4_CD = 8;
          s5_CD = 12;
          pos = new Vector3(transform.position.x, -2.196465f, transform.position.z);
    }

Usage Example

Beispiel #1
0
        private void ProcessJobsQueue()
        {
            for (int jobIndex = 0; jobIndex < this.activeJobsQueue.Count; jobIndex++)
            {
                Job job = this.activeJobsQueue[jobIndex];

                if (job.CanStart())
                {
                    job.Start();
                }

                if (job.IsRunning)
                {
                    job.UpdateState();
                }

                if (job.IsFinished)
                {
                    // Terminate any job actions, which still run on the background
                    job.Cancel();

                    // Move the current job to the "completed jobs" list
                    this.activeJobsQueue.RemoveAt(jobIndex);
                    this.completedJobs.Add(job);

                    // Continue correctly to the next job (after the current job, which is deleted)
                    jobIndex--;
                }

                this.RefreshActiveJobsUI();
            }
        }
All Usage Examples Of Job::Start