Exemplo n.º 1
0
    IEnumerator WaitForInitialization()
    {
        Debug.Log("Waiting for all scripts to finish Initialization...");
        Debug.Log("Started waiting at " + Time.time);
        yield return(new WaitUntil(() => floorHandler.initComplete));

        Debug.Log("FloorHandler initialized at " + Time.time);
        foreach (CharInfo chara in everyInfo)
        {
            floorHandler.UpdateMovementGrid(chara);
            Debug.Log("Waiting for UpdateMovementGrid to finish...");
            Debug.Log("Started waiting at " + Time.time);
            yield return(new WaitUntil(() => floorHandler.calcComplete));

            Debug.Log("Completed at " + Time.time);
            floorHandler.calcComplete = false;
        }
        introBoard.GetComponent <Button>().enabled = true;
        NextChar();
    }