示例#1
0
 public static float CommitTransaction(Customer cust, GameType game)
 {
     if (!instance.mainMenuMode)
     {
         if (Logistics.GetStock(game) > 0)
         {
             //Success
             cust.CommitTransaction(true);
             float revenue = MarketManager.GetSalePrice(game);
             AdjustCash(revenue);
             EndDayManager.AddRevenue(game, revenue);
             Logistics.ExpendGame(game);
             return(revenue);
         }
         else
         {
             //Failure
             cust.CommitTransaction(false);
             return(0);
         }
     }
     else
     {
         cust.CommitTransaction(true);
         return(0);
     }
 }