Ejemplo n.º 1
0
 public void OnDestroy()
 {
     _currJob = null;
     ToDo.Clear();
     ToDo = null;
     if (NeoPlayer.Instance.Selected.Value != null && NeoPlayer.Instance.Selected.Value.Contains(this))
     {
         NeoPlayer.Instance.Selected.Value.Remove(this);
     }
 }
Ejemplo n.º 2
0
 public virtual void ForceNextJob()
 {
     //Debug.Log("forcing next job");
     if (ToDo.Count != 0)
     {
         //Debug.Log("has job to force job");
         _currJob = ToDo.Dequeue();
         _currJob.Update();
     }
 }
Ejemplo n.º 3
0
 public virtual void IsIdle()
 {
     // FIXME: not how its being used, its used as a list of task that happen after another.
     //        maybe have another lsit for diferent things, an on idle list and a seperate todo list
     if ((_currJob == null || _currJob.Status == JobStatus.Done) && ToDo.Count != 0)
     {
         _currJob = ToDo.Dequeue();
     }
     if ((_currJob == null || _currJob.Status == JobStatus.Done))
     {
         return;
     }
     _currJob.Update();
 }