Пример #1
0
    IEnumerator DoSwitchActor()
    {
        bool next = false;

        blackScreen.StartBlackScreen(delegate {
            next = true;
        });
        while (!next)
        {
            yield return(null);
        }

        if (actorFiles[curentIndex].photo != null)
        {
            photoElement.gameObject.SetActive(true);
            photoElement.SetActor(actorFiles[curentIndex]);
        }
        else
        {
            photoElement.gameObject.SetActive(false);
            videoElement.SetActor(actorFiles[curentIndex]);
            yield return(wait);
        }

        blackScreen.CloseBlackScreen(null);
    }