Пример #1
0
 void OnBackstack(IStackableUI stackable)
 {
     if (stackable.GetType() == _uiType && GetComponent <Camera>() != null)
     {
         SetCameraParams(GetComponent <Camera>(), _previousParams);
     }
 }
Пример #2
0
    void OnEnstack(IStackableUI stackable)
    {
        if (stackable.GetType() == _uiType && GetComponent <Camera>() != null)
        {
            _previousParams = GetCameraParams(GetComponent <Camera>());

            if (relicRevealCameraParams != null)
            {
                SetCameraParams(GetComponent <Camera>(), relicRevealCameraParams);
            }
        }
    }
Пример #3
0
    void Awake()
    {
        if (Application.isPlaying)
        {
            _ui = GetComponent <IStackableUI>();
            if (_ui != null)
            {
                _uiType = _ui.GetType();
            }

            UIStack.Instance.onEnstack   += OnEnstack;
            UIStack.Instance.onBackstack += OnBackstack;
        }
    }