/// <summary> /// Creates a future and runs a BeauRoutine with the future as its first argument. /// </summary> static public Future <T> CreateLinked <T>(LinkedFutureDelegate <T> inFunction, MonoBehaviour inHost = null) { var future = Future.Create <T>(); future.LinkTo( Routine.Start(inHost, inFunction(future)) ); return(future); }
/// <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>(LinkedFutureDelegate <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); }
/// <summary> /// Creates a future and runs a BeauRoutine with the future as its first argument. /// </summary> static public Future CreateLinked <A1, A2>(LinkedFutureDelegate <A1, A2> inFunction, A1 inArg1, A2 inArg2, MonoBehaviour inHost = null) { var future = Future.Create(); future.LinkTo( Routine.Start(inHost, inFunction(future, inArg1, inArg2)) ); return(future); }