private void HandleFadeOut() { _submitHandler = null; _buttonHandler = null; _stickHandler = null; EventSystem.current.SetSelectedGameObject(null); }
private void HandleDialog() { ScrollRect[] scrollRects; _scrollRects = new Dictionary <int, ScrollRect>(); _selectedIndices = new Dictionary <int, int>(); if (dialogManager.NumDialogs > 0) { DialogView dialog = dialogManager.GetTopDialog().GetComponent <DialogView>(); _submitHandler = dialog as ISubmitHandler; _buttonHandler = dialog as IButtonInputHandler; _stickHandler = dialog as IAnalogInputHandler; _directionHandler = dialog as IDirectionInputHandler; scrollRects = (dialog as IScrollInputHandler)?.GetScrollRects(); } else { SceneView scene = sceneMediator.SceneObject.GetComponent <SceneView>(); _submitHandler = scene as ISubmitHandler; _buttonHandler = scene as IButtonInputHandler; _stickHandler = scene as IAnalogInputHandler; _directionHandler = scene as IDirectionInputHandler; scrollRects = (scene as IScrollInputHandler)?.GetScrollRects(); } if (scrollRects != null) { for (int i = scrollRects.Length - 1; i >= 0; --i) { if (scrollRects[i] != null) { _scrollRects[i] = scrollRects[i]; _selectedIndices[i] = 0; } } } }