Exemplo n.º 1
0
    private static void Activate(TransitionableScreen screen)
    {
        var canvasGroup = screen.canvasGroup ?? screen.GetComponent <CanvasGroup>();

        canvasGroup.interactable   = true;
        canvasGroup.blocksRaycasts = true;

        screen.gameObject.SetActive(true);
        screen.OnTransitionIn();
        screen.onTransitionIn.Invoke();
    }
Exemplo n.º 2
0
    private static void Deactivate(TransitionableScreen screen)
    {
        var canvasGroup = screen.canvasGroup ?? screen.GetComponent <CanvasGroup>();

        canvasGroup.interactable   = false;
        canvasGroup.blocksRaycasts = false;

        if (screen.deactivateOnTransitionOut)
        {
            screen.gameObject.SetActive(false);
        }

        screen.OnTransitionOut();
        screen.onTransitionOut.Invoke();
    }