コード例 #1
0
 /// <summary>
 /// Set the next instruction to <paramref name="coroutine"/>.
 /// </summary>
 /// <param name="coroutine"></param>
 /// <returns>The FCBuilder on which this was called.</returns>
 /// <remarks>
 /// When executing, the FluentCoroutine will wait for the coroutine provided in the argument to
 /// finish execution before proceeding to the next instruction.
 /// </remarks>
 public FCBuilder Do(Func <IEnumerator> coroutine)
 {
     Instructions.Add(FCInstruction.CreateCoroutine(coroutine));
     return(this);
 }
コード例 #2
0
 /// <summary>
 /// Set the next instruction to <paramref name="action"/>.
 /// </summary>
 /// <param name="action"></param>
 /// <returns>The FCBuilder on which this was called.</returns>
 /// <remarks>
 /// When executing, the FluentCoroutine will wait for the action provided in the argument to
 /// finish execution before proceeding to the next instruction.
 /// </remarks>
 public FCBuilder Do(Action action)
 {
     Instructions.Add(FCInstruction.Create(action));
     return(this);
 }
コード例 #3
0
 /// <summary>
 /// Set the next instruction to <paramref name="yieldInstruction"/>.
 /// </summary>
 /// <param name="yieldInstruction"></param>
 /// <returns>The FCBuilder on which this was called.</returns>
 /// <remarks>
 /// See the Unity Scripting API documentation on YieldInstruction for more information.
 /// </remarks>
 public FCBuilder Yield(YieldInstruction yieldInstruction)
 {
     Instructions.Add(FCInstruction.Create(yieldInstruction));
     return(this);
 }
コード例 #4
0
 /// <summary>
 /// Set the next instruction to <paramref name="customYieldInstruction"/>.
 /// </summary>
 /// <param name="customYieldInstruction"></param>
 /// <returns>The FCBuilder on which this was called.</returns>
 /// <remarks>
 /// See the Unity Scripting API documentation on CustomYieldInstruction for more information.
 /// </remarks>
 public FCBuilder Yield(Func <IEnumerator> yieldInstruction)
 {
     Instructions.Add(FCInstruction.CreateYield(yieldInstruction));
     return(this);
 }
コード例 #5
0
 /// <summary>
 /// Set the next instruction to wait for one frame.
 /// </summary>
 /// <returns>The FCBuilder on which this was called.</returns>
 /// <remarks>
 /// This is equivalent to using <c>yield return null;</c> in a coroutine.
 /// </remarks>
 public FCBuilder WaitForFrame()
 {
     Instructions.Add(FCInstruction.Create(null as YieldInstruction));
     return(this);
 }