Beispiel #1
0
 /// <summary>
 /// Will be executed each frame while the task is running.
 /// </summary>
 public override void DoAction()
 {
     if (Subtask.Finished || Context.Time >= end)
     {
         Finish();
     }
     else
     {
         Subtask.DoAction();
     }
 }
 /// <summary>
 /// Will be executed each frame while the task is running.
 /// </summary>
 public override void DoAction()
 {
     if (nextAction <= Context.Time)
     {
         nextAction = Context.Time + tickInterval;
         Subtask.DoAction();
         if (Subtask.Finished)
         {
             Finish();
         }
     }
 }
Beispiel #3
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();
     }
 }
 /// <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();
         }
     }
 }
Beispiel #5
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();
         }
     }
 }