private IEnumerator FadingDoor(Door door)
    {
        fading.StartFadeOut();
        yield return(new WaitForSeconds(1f));

        foreach (var room in door.scenesToLoad)
        {
            LoadScene(room);
        }
        StartCoroutine(UnloadScene(door.scenesToUnload));
        OnChangedRoom(door);
        OnLoadedEnvironment();
        Debug.Log("Scene is loaded");
    }
Ejemplo n.º 2
0
    private IEnumerator FadingProp()
    {
        fading.StartFadeOut();
        yield return(new WaitForSeconds(0.5f));

        OnStartedPropInteraction(currentTargetGo, currentTarget);
    }
    private IEnumerator FadingProp(bool hasToSetTarget)
    {
        fading.StartFadeOut();
        yield return(new WaitForSeconds(0.5f));

        OnFinishedPropInteraction(currentTargetGo, currentTarget);
        if (hasToSetTarget)
        {
            SetTarget();
        }
    }
    private IEnumerator FadingNpc(NPCs npc, GameObject go, bool isEntering, string passage = "")
    {
        fading.StartFadeOut();
        yield return(new WaitForSeconds(0.5f));

        if (isEntering)
        {
            OnStartedNpcInteraction(npc, go, passage);
        }
        else
        {
            OnFinishedNpcInteraction(currentNPC, currentNPCGo);
        }
    }