Exemple #1
0
        /// <summary>
        /// Runs the coroutine prior to executing the .Then() action.
        /// </summary>
        public Promise Run(IEnumerator coroutine)
        {
            if (coroutine == null)
            {
                throw new ArgumentNullException("coroutine");
            }

            return(NewPromise.ThenRun(coroutine));
        }
Exemple #2
0
        /// <summary>
        /// Executes the action prior to executing the .Then() action.
        /// </summary>
        public Promise Yield(YieldInstruction yieldInstruction)
        {
            if (yieldInstruction == null)
            {
                throw new ArgumentNullException("yieldInstruction");
            }

            return(NewPromise.ThenYield(yieldInstruction));
        }
Exemple #3
0
        /// <summary>
        /// Executes the action prior to executing the .Then() action.
        /// </summary>
        public Promise Yield(CustomYieldInstruction customYieldInstruction)
        {
            if (customYieldInstruction == null)
            {
                throw new ArgumentNullException("customYieldInstruction");
            }

            return(NewPromise.ThenYield(customYieldInstruction));
        }
Exemple #4
0
 /// <summary>
 /// Waits for a number of seconds prior to executing the .Then() action.
 /// </summary>
 public Promise WaitFor(float seconds)
 {
     return(NewPromise.ThenYield(new WaitForSeconds(seconds)));
 }