Example #1
0
        public virtual void OpenBegin(MenuBase openedFrom)
        {
            canvasGroup.interactable = false;

            if (ignoreParenting)
            {
                return;
            }

            parent = openedFrom;
            if (parent.menuChilds.Contains(this) == false)
            {
                parent.menuChilds.Add(this);
            }
        }
Example #2
0
        public static void Back()
        {
            MenuActionBase.currentAction?.StopAction();

            if (MenuController.MenuHistory == null)
            {
                return;
            }

            if (MenuController.MenuHistory.Count == 0)
            {
                return;
            }

            MenuBase lastMenu = MenuController.MenuHistory[MenuController.MenuHistory.Count - 1];

            lastMenu.backButton?.onClick.Invoke();
        }