private void Awake() { if (Ins != null) { Destroy(gameObject); } else { Ins = this; } }
public static void LaunchFinishMenu(string userDocument) { Random random = new Random(); Order newOrder = new Order(random.Next(10000, 99999), userDocument); Alert.ShowAlert(newOrder.ToString(), ConsoleColor.DarkBlue); Console.WriteLine("\n"); ShopCtrl.ShowShoppingCart(); //OrderCtrl.CreateOrder(newOrder); OrderCtrl.ReadAllOrders(); }
public static void LaunchShopMenu(string user) { bool start = true; int option = (int)Options.Default; do { ShowMenu(user); try { option = int.Parse(Console.ReadLine()); } catch (Exception) { Alert.ShowAlert("Invalid Option", ConsoleColor.Red); } switch (option) { case (int)Options.Add: Banner.ShowBanner("Add to Shopping Cart"); ProductCtrl.ReadAllProducts(); ShopCtrl.GetProduct(Product.GetId().Id, user); Alert.Confirmation(); break; case (int)Options.Remove: Banner.ShowBanner("Remove from Shopping Cart"); ShopCtrl.ShowShoppingCart(); ShopCtrl.RemoveProduct(Product.GetId().Id); Alert.Confirmation(); break; case (int)Options.Cart: Banner.ShowBanner(" Your Shopping Cart "); ShopCtrl.ShowShoppingCart(); Alert.Confirmation(); break; case (int)Options.Finish: Banner.ShowBanner(" Your Order is Finished "); UtilityMenu.LaunchFinishMenu(user); Alert.Confirmation(); break; case (int)Options.Exit: start = false; break; } } while (start); }
private MatchCtrl m_MatchCtrl; //比赛系统 public SystemFacade() { m_AccountCtrl = new AccountCtrl(); m_SelectGameCtrl = new GameCtrl(); m_RuleCtrl = new RuleCtrl(); m_ServiceCtrl = new ServiceCtrl(); m_SettingCtrl = new SettingCtrl(); m_ShareCtrl = new ShareCtrl(); m_RecordCtrl = new RecordCtrl(); m_ShopCtrl = new ShopCtrl(); m_PresentCtrl = new PresentCtrl(); m_MahJongCtrl = new MaJiangGameCtrl(); m_ChatCtrl = new ChatCtrl(); m_AudioSettingCtrl = new AudioSettingCtrl(); m_NoticeCtrl = new NoticeCtrl(); m_MatchCtrl = new MatchCtrl(); RegisterWindow(); }
public static void ForceShopPrices(ShopCtrl __instance) { S.I.shopCtrl.refillCost = 40; S.I.shopCtrl.refillInterval = 20; __instance.refillCostText.text = (__instance.refillCost + __instance.refillAdd).ToString(); foreach (var card in __instance.currentShopOptions) { var itemObj = card.itemObj; if (itemObj.pactObj == null) { if ((UnityEngine.Object)card.cardInner.voteDisplay != (UnityEngine.Object)null) { card.cardInner.voteDisplay.gameObject.SetActive(false); } int num = Mathf.RoundToInt((float)(__instance.rarityCostbase * 2 + itemObj.rarity * __instance.rarityCostMultiplier)); if (itemObj.type == ItemType.Spell) { num = Mathf.RoundToInt((float)__instance.rarityCostbase + (float)(itemObj.rarity * __instance.rarityCostMultiplier) * 0.75f); } if (__instance.shopZoneType == ZoneType.DarkShop) { num = Mathf.RoundToInt((float)(num * 2)); } if (S.I.runCtrl.currentRun.hellPasses.Contains(12)) { num = Mathf.RoundToInt((float)num * 1.15f); } card.cardInner.priceText.amount.text = string.Format("{0}", (object)num); card.cardInner.priceText.Set(__instance.shopZoneType); card.price = num; } else { card.price = 0; } } }