/// <summary> /// Show a menu screen /// </summary> public void show(MenuUI menu, float transitionTime = 0.5f, Callback callback = null) { MenuUI currentMenu = getCurrentMenu; // Add menu to traversal history history.Push(menu); // Hide the currently opened menu if there is a menu that is open, then once the transition completes, show the new menu if (currentMenu != null) { currentMenu.hideMenu(transitionTime, MenuUI.MenuTransition.FORWARD, () => { menu.showMenu(transitionTime, MenuUI.MenuTransition.FORWARD, callback); }); } else { menu.showMenu(transitionTime, MenuUI.MenuTransition.FORWARD, callback); } }