Exemple #1
0
        public override void Execute(INotification notification)
        {
            //菜单代理
            MenuProxy menuProxy = new MenuProxy();

            Facade.RegisterProxy(menuProxy);

            //客户端代理
            ClientProxy clientProxy = new ClientProxy();

            Facade.RegisterProxy(clientProxy);

            //服务员代理
            WaiterProxy waitProxy = new WaiterProxy();

            Facade.RegisterProxy(waitProxy);

            //厨师代理
            CookProxy cookProxy = new CookProxy();

            Facade.RegisterProxy(cookProxy);

            //-----------------------------------------
            //自己填的客房代理
            RoomProxy roomProxy = new RoomProxy();

            Facade.RegisterProxy(roomProxy);
            //---------------------------------------

            OrderProxy orderProxy = new OrderProxy();

            Facade.RegisterProxy(orderProxy);

            MainUI mainUI = notification.Body as MainUI;

            if (null == mainUI)
            {
                throw new Exception("程序启动失败..");
            }
            Facade.RegisterMediator(new MenuMediator(mainUI.MenuView));
            Facade.RegisterMediator(new ClientMediator(mainUI.ClientView));
            Facade.RegisterMediator(new WaiterMediator(mainUI.WaitView));
            Facade.RegisterMediator(new CookMediator(mainUI.CookView));
            //----------------------------
            //自己填的客房命令
            Facade.RegisterMediator(new RoomMediator(mainUI.roomView));

            //--------------------------------------
            Facade.RegisterCommand(OrderSystemEvent.GUEST_BE_AWAY, typeof(GuestBeAwayCommed));
            Facade.RegisterCommand(OrderSystemEvent.GET_ORDER, typeof(GetAndExitOrderCommed));
            Facade.RegisterCommand(OrderSystemEvent.CookCooking, typeof(CookCommend));
            Facade.RegisterCommand(OrderSystemEvent.selectWaiter, typeof(WaiterCommend));
            Facade.RegisterCommand(OrderSystemEvent.Rooming, typeof(RoomCommand));
        }
Exemple #2
0
        public override void Execute(INotification notification)
        {
            MainUI mainUI = notification.Body as MainUI;

            if (null == mainUI)
            {
                throw new Exception("程序启动失败..");
            }

            //数据信息代理
            CardDbProxy cardDbProxy = new CardDbProxy();

            Facade.RegisterProxy(cardDbProxy);
            EffectInfoProxy effectInfoProxy = new EffectInfoProxy();

            Facade.RegisterProxy(effectInfoProxy);
            TestCaseProxy testCaseProxy = new TestCaseProxy();

            Facade.RegisterProxy(testCaseProxy);
            //游戏模式代理
            GameModelProxy gameModelProxy = new GameModelProxy();

            Facade.RegisterProxy(gameModelProxy);

            //UI层代理
            UIControllerListMediator uIControllerListMediator = new UIControllerListMediator(mainUI.UIControllerListView);

            Facade.RegisterMediator(uIControllerListMediator);



            //玩家组代理
            PlayerGroupProxy playerGroupProxy = new PlayerGroupProxy();

            Facade.RegisterProxy(playerGroupProxy);

            //游戏容器代理
            GameContainerProxy gameContainerProxy = new GameContainerProxy();

            Facade.RegisterProxy(gameContainerProxy);



            //选择阶段进程代理
            ChooseStageCircuitProxy chooseStageCircuitProxy = new ChooseStageCircuitProxy();

            Facade.RegisterProxy(chooseStageCircuitProxy);



            SendNotification(OrderSystemEvent.START_CIRCUIT, mainUI, OrderSystemEvent.START_CIRCUIT_MAIN);
        }
Exemple #3
0
        public override void Execute(INotification notification)
        {
            //菜单代理
            MenuProxy menuProxy = new MenuProxy();

            Facade.RegisterProxy(menuProxy);

            //客户端代理
            ClientProxy clientProxy = new ClientProxy();

            Facade.RegisterProxy(clientProxy);

            //服务员代理
            WaiterProxy waitProxy = new WaiterProxy();

            Facade.RegisterProxy(waitProxy);

            //厨师代理
            CookProxy cookProxy = new CookProxy();

            Facade.RegisterProxy(cookProxy);

            //订单代理
            OrderProxy orderProxy = new OrderProxy();

            Facade.RegisterProxy(orderProxy);

            MainUI mainUI = notification.Body as MainUI;

            if (null == mainUI)
            {
                throw new Exception("程序启动失败..");
            }


            Facade.RegisterMediator(new MenuMediator(mainUI.MenuView));
            Facade.RegisterMediator(new ClientMediator(mainUI.ClientView));
            Facade.RegisterMediator(new WaiterMediator(mainUI.WaitView));
            Facade.RegisterMediator(new CookMediator(mainUI.CookView));
        }
Exemple #4
0
 /// <summary>
 /// start program
 /// </summary>
 public void StartUp(MainUI mainUI)
 {
     SendNotification(OrderSystemEvent.STARTUP, mainUI);
 }
 /// <summary>
 /// start program
 /// </summary>
 public void StartUp(MainUI mainUI)
 {
     Debug.Log("启动程序");
     SendNotification(OrderSystemEvent.Start, mainUI);
 }