コード例 #1
0
 /// <summary>
 /// Will be executed when the task is started.
 /// </summary>
 public override void Start()
 {
     if (conditions)
     {
         Subtask.SafeStart();
     }
     else
     {
         Finish();
     }
 }
コード例 #2
0
 /// <summary>
 /// Will be executed each frame while the task is running.
 /// </summary>
 public override void DoAction()
 {
     if (!Subtask.Started)
     {
         if (Subtask.CheckConditions())
         {
             Subtask.SafeStart();
         }
     }
     else if (Subtask.Finished)
     {
         Subtask.Reset();
     }
     else
     {
         Subtask.DoAction();
     }
 }
コード例 #3
0
 /// <summary>
 /// Will be executed each frame while the task is running.
 /// </summary>
 public override void DoAction()
 {
     if (!Subtask.Finished)
     {
         Subtask.DoAction();
     }
     else
     {
         Subtask.SafeEnd();
         if (Subtask.CheckConditions())
         {
             Subtask.SafeStart();
         }
         else
         {
             Finish();
         }
     }
 }
コード例 #4
0
 /// <summary>
 /// Will be executed each frame while the task is running.
 /// </summary>
 public override void DoAction()
 {
     Subtask.DoAction();
     if (Subtask.Finished)
     {
         if (++iteration < iterations)
         {
             Subtask.Reset();
             if (Subtask.CheckConditions())
             {
                 Subtask.SafeStart();
             }
             else
             {
                 Finish();
             }
         }
         else
         {
             Finish();
         }
     }
 }
コード例 #5
0
 /// <summary>
 /// Will be executed when the task is started.
 /// </summary>
 public override void Start()
 {
     TaskContext <DataType> .GlobalSemaphores[identifier]++;
     Subtask.SafeStart();
 }
コード例 #6
0
 /// <summary>
 /// Will be executed when the task is started.
 /// </summary>
 public override void Start()
 {
     Subtask.SafeStart();
     this.nextAction = Context.Time + tickInterval;
 }
コード例 #7
0
 /// <summary>
 /// Will be executed when the task is started.
 /// </summary>
 public override void Start()
 {
     Context.LocalSemaphores[identifier]++;
     Subtask.SafeStart();
 }
コード例 #8
0
 /// <summary>
 /// Will be executed when the task is started.
 /// </summary>
 public override void Start()
 {
     Subtask.SafeStart();
     iteration = 0;
 }
コード例 #9
0
 /// <summary>
 /// Will be executed when the task is started.
 /// </summary>
 public override void Start()
 {
     Subtask.SafeStart();
     this.nextAction = Context.Time + seconds;
 }
コード例 #10
0
 /// <summary>
 /// Will be executed when the task is started.
 /// </summary>
 public override void Start()
 {
     Subtask.SafeStart();
     end = Context.Time + seconds;
 }