Exemplo n.º 1
0
    public IEnumerator HidePanel <T>(TransitionCode transition) where T : PanelViewModel
    {
        var panel = Panels.OfType <T>().FirstOrDefault();

        if (!panel)
        {
            yield return(null);
        }

        yield return(UI.Transitions.Get(transition)?.HideCoroutine(panel));

        panel.IsEnabled = false;
    }
 public TransitionUIModel Get(TransitionCode code)
 => Transitions.FirstOrDefault(t => t.Code == code);
 public IEnumerator ShowPanel <T>(TransitionCode code) where T : PanelViewModel
 {
     yield return(ViewModel.ShowPanel <T>(code));
 }
 public void HidePanelSynchronously <T>(TransitionCode code) where T : PanelViewModel
 {
     StartCoroutine(ViewModel.HidePanel <T>(code));
 }