Beispiel #1
0
    public bool isReadyForTurnStart()
    {
        foreach (Sequence s in Sequences)
        {
            if (!s.isReadyForTurnStart)
            {
                return(false);
            }
        }

        if (!Nucleobase_View.allAtDestination())
        {
            return(false);
        }

        if (!LeftEnzyme.isReadyForTurnStart)
        {
            return(false);
        }

        if (!RightEnzyme.isReadyForTurnStart)
        {
            return(false);
        }

        return(true);
    }
Beispiel #2
0
    protected IEnumerator CycleTurn()
    {
        Debug.Log("Preparing Turn");

        foreach (Sequence s in Sequences)
        {
            if (!s.isReadyForTurnStart)
            {
                yield return(new WaitForSeconds(0.25f));
            }
        }

        while (!Nucleobase_View.allAtDestination())
        {
            yield return(new WaitForSeconds(0.25f));
        }

        Debug.Log("Nucleobases are ready");
        NucleobasesReadyEvent.Invoke();

        while (!LeftEnzyme.isReadyForTurnStart)
        {
            yield return(new WaitForSeconds(0.25f));
        }

        while (!RightEnzyme.isReadyForTurnStart)
        {
            yield return(new WaitForSeconds(0.25f));
        }

        Debug.Log("Enzymes are ready");
        EnzymesReadyEvent.Invoke();
    }