Example #1
0
        public override void DoComplexAction(MessageUIMenuEnum enumerator, params object[] objects)
        {
            MessageUIMenuEnum choose = (MessageUIMenuEnum)(object)enumerator;

            switch (choose)
            {
            case MessageUIMenuEnum.ChangePanel:
                GetLogicalComponent <VisibilityPanelComponent>().Show((GameObject)objects[0]);
                GetLogicalComponent <SelectionPanelComponent>().ChangeSelectNext((GameObject)objects[0]);
                break;

            case MessageUIMenuEnum.CloseMenu:
                GetLogicalComponent <VisibilityPanelComponent>().OpenCloseAllPanels(false);
                GetLogicalComponent <SelectionPanelComponent>().Reset();
                break;

            case MessageUIMenuEnum.ChangeButton:
                GetLogicalComponent <SelectionPanelComponent>().ChangeSelectNext((GameObject)objects[0]);
                break;

            case MessageUIMenuEnum.GetInputOpenCloseMenu:
                if (stateUI == StateUI.Pause)
                {
                    SendOut(EventAction.CallPause, TupleExtend.KeyTuple("pause", !isOpenUI));
                }
                break;

            case MessageUIMenuEnum.GetInputReturn:
                if (isOpenUI)
                {
                    if (!GetLogicalComponent <SelectionPanelComponent>().IsOpenPage)
                    {
                        GetLogicalComponent <VisibilityPanelComponent>().Show(GetLogicalComponent <SelectionPanelComponent>().PreSelect);
                        GetLogicalComponent <SelectionPanelComponent>().ChangeInPreSelect();
                    }
                    else if (stateUI == StateUI.Pause)
                    {
                        SendOut(EventAction.CallPause, TupleExtend.KeyTuple("pause", !isOpenUI));
                    }
                }
                break;
            }
        }
Example #2
0
 protected static Tuple <string, object> KeyTuple(string s, object obj)
 {
     return(TupleExtend.KeyTuple(s, obj));
 }