//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; } }
//Called when this option is selected public override BattleOption Select() { if (increasesDepth) { battleUI.IncreaseDepth(); } battleUI.UpdateOptionBox(0); MenuOption battleOp = derivedOptions[currentIndex]; if (battleOp != null) { SetChildrenEnableAtIndex(currentIndex); battleOp.SetChildrenNewEnable(true); return(battleOp); } else { return(null); } }