Ejemplo n.º 1
0
    public static RadicalRoutine Create(IEnumerator extendedCoRoutine)
    {
        RadicalRoutine radicalRoutine = new RadicalRoutine();

        radicalRoutine.extended = extendedCoRoutine;
        if (radicalRoutine.extended is INotifyStartStop)
        {
            (radicalRoutine.extended as INotifyStartStop).Start();
        }
        radicalRoutine.enumerator = radicalRoutine.Execute(extendedCoRoutine);
        return(radicalRoutine);
    }
Ejemplo n.º 2
0
    public static RadicalRoutine Run(IEnumerator extendedCoRoutine, string methodName, object target)
    {
        RadicalRoutine radicalRoutine = new RadicalRoutine();

        radicalRoutine.Method   = methodName;
        radicalRoutine.Target   = target;
        radicalRoutine.extended = extendedCoRoutine;
        if (radicalRoutine.extended is INotifyStartStop)
        {
            (radicalRoutine.extended as INotifyStartStop).Start();
        }
        radicalRoutine.enumerator = radicalRoutine.Execute(extendedCoRoutine);
        RadicalRoutineHelper.Current.Run(radicalRoutine);
        return(radicalRoutine);
    }
	public static RadicalRoutine Run(IEnumerator extendedCoRoutine, string methodName, object target)
	{
		var rr = new RadicalRoutine();
		rr.Method = methodName;
		rr.Target = target;
		rr.extended = extendedCoRoutine;
		if (rr.extended is INotifyStartStop)
		{
			(rr.extended as INotifyStartStop).Start();
		}
		rr.enumerator = rr.Execute(extendedCoRoutine);
		RadicalRoutineHelper.Current.Run(rr);
		return rr;
		
	}
	/// <summary>
	/// Creates a radical coroutine for a specific function
	/// </summary>
	/// <param name='extendedCoRoutine'>
	/// The function to use as a coroutine
	/// </param>
	public static RadicalRoutine Create(IEnumerator extendedCoRoutine)
	{
		var rr = new RadicalRoutine();
		rr.extended = extendedCoRoutine;
		if (rr.extended is INotifyStartStop)
		{
			(rr.extended as INotifyStartStop).Start();
		}
		rr.enumerator = rr.Execute(extendedCoRoutine);
		return rr;
	}
Ejemplo n.º 5
0
 public static RadicalRoutine Create(IEnumerator extendedCoRoutine)
 {
     RadicalRoutine radicalRoutine = new RadicalRoutine();
     radicalRoutine.extended = extendedCoRoutine;
     if (radicalRoutine.extended is INotifyStartStop)
     {
         (radicalRoutine.extended as INotifyStartStop).Start();
     }
     radicalRoutine.enumerator = radicalRoutine.Execute(extendedCoRoutine);
     return radicalRoutine;
 }