Example #1
0
 public void BuyBusiness()
 {
     try
     {
         Check();
         if (!AllUpgradeController.GetMoney(Price))
         {
             return;
         }
         Change();
     }
     catch (Exception ex)
     {
         Menu.Instance.OnError();
         ShowText.Instance.OnError(ex.Message);
     }
 }
Example #2
0
        private bool Check(ulong price, int managerNum)
        {
            switch (managerNum)
            {
            case 1:
                if (manager1)
                {
                    throw new Exception("Менеджер уже куплен");
                }
                break;

            case 2:
                if (manager2)
                {
                    throw new Exception("Менеджер уже куплен");
                }
                break;
            }
            return(AllUpgradeController.GetMoney(price));
        }