Exemple #1
0
    public void RemoveCustomer()
    {
        if (currentCustomer > 0)
        {
            customerLists[0].GetComponent <CustomerCtl>().LeaveManor();
            int Money = customerLists[0].GetComponent <CustomerInfo>().Money;
            customerLists.RemoveAt(0);
            AppFacade.getInstance.SendNotification(NotiConst.SET_CURRENT_CUSTOMER, currentCustomer - 1);
            //补齐显示的顾客
            if (currentCustomer >= visibleCustomer)
            {
                SendRandomAddCustomerCommand();
            }

            MainMenuUIMediator mainMenuUIMediator = (MainMenuUIMediator)AppFacade.GetInstance().RetrieveMediator(MainMenuUIMediator.NAME);
            MainMenuUIView     mainMenuUIView     = (MainMenuUIView)mainMenuUIMediator.ViewComponent;
            mainMenuUIView.SetGold(mainMenuUIView.Gold + Money);
        }
    }