private IEnumerator OpenMenuCo(Menu menuToOpen, UIMovable uIMovable) { currentMenu.Close(uIMovable); previousMenu = currentMenu; yield return(new WaitForSeconds(UIAestheticsManager.Instance.secondsToMoveButtons * 2)); currentMenu = menuToOpen; currentMenu.Open(); }
private IEnumerator CloseCo(UIMovable delayedUiMovable) { foreach (UIMovable uIMovable in _uiMovables) { if (uIMovable != delayedUiMovable) { uIMovable.TweenOffScreen(); } } yield return(new WaitForSeconds(UIAestheticsManager.Instance.secondsToMoveButtons)); delayedUiMovable.TweenOffScreen(); yield return(new WaitForSeconds(UIAestheticsManager.Instance.secondsToMoveButtons)); _container.SetActive(false); }
public void Close(UIMovable uIMovable) { StartCoroutine(CloseCo(uIMovable)); }
public void OpenMenu(Menu menuToOpen, UIMovable uIMovable) { StartCoroutine(OpenMenuCo(menuToOpen, uIMovable)); _pathMenu.AssignCurrentMenu(menuToOpen); }