Ejemplo n.º 1
0
        public override void HandleNotification(INotification notification)
        {
            switch (notification.Name)
            {
            case OrderSystemEvent.CALL_WAITER:
                ClientItem client = notification.Body as ClientItem;
                if (null == client)
                {
                    throw new Exception("Client is null,please check it.");
                }
                Order order = new Order(client, new List <MenuItem>());
                orderProxy.AddOrder(order);
                Debug.Log(" 服务员给" + client.id + "号桌顾客拿菜单和订单 ");
                SendNotification(OrderSystemEvent.UPMENU, order);
                break;

            case OrderSystemEvent.ORDER:
                SendNotification(OrderSystemEvent.CALL_COOK, notification.Body);
                break;

            case OrderSystemEvent.GET_PAY:
                Debug.Log(" 服务员拿到顾客的付款 ");
                break;

            case OrderSystemEvent.FOOD_TO_CLIENT:
                Debug.Log(" 服务员上菜 ");
                SendNotification(OrderSystemEvent.PAY, notification.Body);
                break;
            }
        }