/// <summary>
        /// Creates an empty FluentCoroutine.
        /// </summary>
        /// <param name="executionContext">The MonoBehaviour that will be used for starting and stopping coroutines.</param>
        /// <returns>An empty FluentCoroutine.</returns>
        /// <remarks>
        /// The <see cref="executionContext"/> MonoBehaviour must be enabled and its
        /// GameObject must be active when calling <see cref="Execute"/>.
        /// </remarks>
        public static FluentCoroutine Create(MonoBehaviour executionContext)
        {
            FluentCoroutine fluentCoroutine;

            fluentCoroutine = new FluentCoroutine();
            fluentCoroutine.executionContext = executionContext;
            return(fluentCoroutine);
        }
        public static FluentCoroutine Finalize(FCBuilder builder)
        {
            FluentCoroutine fluentCoroutine;

            fluentCoroutine = new FluentCoroutine();
            fluentCoroutine.executionContext = builder.ExecutionContext;
            fluentCoroutine.instructions.AddRange(builder.Instructions);
            return(fluentCoroutine);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// This will create and return a FluentCoroutine containing the current instruction set.
 /// </summary>
 /// <returns>Finalized form of the FluentCoroutine.</returns>
 public FluentCoroutine Finalize()
 {
     return(FluentCoroutine.Finalize(this));
 }