コード例 #1
0
        //Called when the player presses the selection button
        public void Select()
        {
            MenuOption temp = currentOption.Select() as MenuOption;

            if (temp != null)
            {
                MenuOption menuOp = currentOption.GetParentOption() as MenuOption;
                if (currentOption.GetParentOption() != null && menuOp != null)
                {
                    menuOp.SetChildrenNewEnable(false);
                }
                currentOption = temp;
            }
        }
コード例 #2
0
        //Called when the player presses the back button
        public void Back()
        {
            MenuOption temp = currentOption.Back() as MenuOption;

            if (temp != null)
            {
                currentOption = temp;
                MenuOption menuOp = currentOption.GetParentOption() as MenuOption;
                if (menuOp != null)
                {
                    Debug.Log("Parent: " + menuOp.name + "\tChild: " + currentOption);
                    Debug.Log(currentOption.GetIndexInParent());
                    menuOp.SetChildrenEnableAtIndex(currentOption.GetIndexInParent());
                }
            }
        }