예제 #1
0
        /// <summary>
        /// Creates a future and runs a BeauRoutine with the future as its first argument.
        /// </summary>
        static public Future <T> CreateLinked <T, A1, A2, A3, A4>(GenericLinkedFutureDelegate <T, A1, A2, A3, A4> inFunction, A1 inArg1, A2 inArg2, A3 inArg3, A4 inArg4, MonoBehaviour inHost = null)
        {
            var future = Future.Create <T>();

            future.LinkTo(
                Routine.Start(inHost, inFunction(future, inArg1, inArg2, inArg3, inArg4))
                );
            return(future);
        }
예제 #2
0
        /// <summary>
        /// Creates a future and runs a BeauRoutine with the future as its first argument.
        /// </summary>
        static public Future <T> CreateLinked <T>(GenericLinkedFutureDelegate <T> inFunction, MonoBehaviour inHost = null)
        {
            var future = Future.Create <T>();

            future.LinkTo(
                Routine.Start(inHost, inFunction(future))
                );
            return(future);
        }