Esempio n. 1
0
    protected static IEnumerator WaitForFinishRoutine( ILugusCoroutineHandle c1, ILugusCoroutineHandle c2, ILugusCoroutineHandle c3 )
    {
        while( c1.Running || c2.Running || c3.Running )
        {
            yield return null;
        }

        yield break;
    }
    protected static IEnumerator WaitForFinishRoutine(ILugusCoroutineHandle c1, ILugusCoroutineHandle c2, ILugusCoroutineHandle c3)
    {
        while (c1.Running || c2.Running || c3.Running)
        {
            yield return(null);
        }

        yield break;
    }
Esempio n. 3
0
    protected void Attack()
    {
        if (showMuzzleFlashRoutine != null && showMuzzleFlashRoutine.Running)
        {
            showMuzzleFlashRoutine.StopRoutine();
        }

        // Run this coroutine on the game object itself to ensure it is destroyed along with it.
        showMuzzleFlashRoutine = LugusCoroutines.use.StartRoutine(ShowMuzzleFlash(), this.gameObject);
    }
    public ILugusCoroutineHandle StartRoutine(IEnumerator routine, GameObject runner = null)
    {
        ILugusCoroutineHandle handle = GetHandle(runner);

        Coroutine coroutine = handle.StartRoutine(routine);

        handle.Coroutine = coroutine;

        return(handle);
    }
    public void Add(ILugusCoroutineHandle routine)
    {
        if (started)
        {
            Debug.LogError("LugusCoroutineWaiter:Add : cannot add routines to already started waiter!");
            return;
        }

        routines.Add(routine);
    }
    protected ILugusCoroutineHandle CreateHandle(GameObject runner = null)
    {
        GameObject handleGO = runner;

        if (handleGO == null)
        {
            handleGO = new GameObject("LugusCoroutineHandle");
            handleGO.transform.parent = handleHelperParent;
        }

        ILugusCoroutineHandle handle = handleGO.AddComponent <LugusCoroutineHandleDefault>();

        handles.Add(handle);

        return(handle);
    }
Esempio n. 7
0
    public void Add( ILugusCoroutineHandle routine )
    {
        if( started )
        {
            Debug.LogError("LugusCoroutineWaiter:Add : cannot add routines to already started waiter!");
            return;
        }

        routines.Add( routine );
    }
Esempio n. 8
0
 public static ILugusCoroutineHandle WaitForFinish( ILugusCoroutineHandle c1, ILugusCoroutineHandle c2, ILugusCoroutineHandle c3 )
 {
     return LugusCoroutines.use.StartRoutine( WaitForFinishRoutine(c1, c2, c3) );
 }
 public static ILugusCoroutineHandle WaitForFinish(ILugusCoroutineHandle c1, ILugusCoroutineHandle c2, ILugusCoroutineHandle c3)
 {
     return(LugusCoroutines.use.StartRoutine(WaitForFinishRoutine(c1, c2, c3)));
 }