public void PlayCloseAnimationImmdiately(WooPanel panel, bool notify = true) { panel.gameObject.SetActive(true); panelNodes[panel].StopCoroutines(); panel.PanelState = PanelState.IsClosing; if (notify) { panel.NotifyClosingBegin(); } panel.PanelState = PanelState.Closed; if (notify) { panel.NotifyClosingEnd(); } panel.PanelState = PanelState.IsClosing; RewindToEndPanelAnimation(panel); SamplePanelAnimator(panel); panel.PanelState = PanelState.Closed; panel.gameObject.SetActive(panel.PanelProperties.ActiveWhenClosed); }
public void CloseImmediately(WooPanel panel, bool notify = false) { var children = GetChildren(panel); for (int i = 0; i < children.Count; i++) { CloseImmediately(children[i].Panel, notify); } RewindToEndPanelAnimation(panel); SamplePanelAnimator(panel); panelNodes[panel].IsClosed = true; if (notify) { panel.NotifyClosingEnd(); } panel.gameObject.SetActive(panel.PanelProperties.ActiveWhenClosed); }