void OnBackstack(IStackableUI stackable) { if (stackable.GetType() == _uiType && GetComponent <Camera>() != null) { SetCameraParams(GetComponent <Camera>(), _previousParams); } }
void OnEnstack(IStackableUI stackable) { if (stackable.GetType() == _uiType && GetComponent <Camera>() != null) { _previousParams = GetCameraParams(GetComponent <Camera>()); if (relicRevealCameraParams != null) { SetCameraParams(GetComponent <Camera>(), relicRevealCameraParams); } } }
void Awake() { if (Application.isPlaying) { _ui = GetComponent <IStackableUI>(); if (_ui != null) { _uiType = _ui.GetType(); } UIStack.Instance.onEnstack += OnEnstack; UIStack.Instance.onBackstack += OnBackstack; } }