public async Task <IActionResult> Edit(int id, [Bind("Id,MilkTypeName")] MilkType milkType) { if (id != milkType.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(milkType); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MilkTypeExists(milkType.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(milkType)); }
public float GetPlayerUpgradeMilkSKill(MilkType _type) { float result = 0; result = userData.milkItemList[(int)_type].milkDuration + (userData.upgradePlayer.buffDurationLevel * userData.upgradePlayer.buffDurationIncrease); return(result); }
public Order(Size _size, MilkType _milkType, ShotType _shotType, Drink _drink, ShotModifier _shotModifier) { shotModifier = _shotModifier; size = _size; milkType = _milkType; shotType = _shotType; drink = _drink; }
public async Task <IActionResult> Create([Bind("Id,MilkTypeName")] MilkType milkType) { if (ModelState.IsValid) { _context.Add(milkType); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(milkType)); }
public string MilkTypeToString(MilkType mt) { switch (mt) { case MilkType.Milk_CREAM: return("Cream (C)"); case MilkType.Milk_SKIM: return("Skim (S)"); case MilkType.Milk_WHOLE: return("Whole (W)"); default: return("idk"); } }
/** * @brief Unlocks a certain item * @param itemType The type of item to unlock * @param item The index of the item that will be unlocked, must cast enum to int */ public void UnlockItem(ItemType itemType, int item) { switch (itemType) { case ItemType.Item_BEAN: BeanType beanType = (BeanType)item; if (unlockedBeans.ContainsKey(beanType)) { unlockedBeans[beanType] = true; justUnlockedText.text = "Unlocked: " + BeanTypeToString(beanType); } break; case ItemType.Item_MILK: MilkType milkType = (MilkType)item; if (unlockedMilk.ContainsKey(milkType)) { unlockedMilk[milkType] = true; justUnlockedText.text = "Unlocked: " + MilkTypeToString(milkType); } break; case ItemType.Item_FLAVOR_SHOT: FlavorShot f = (FlavorShot)item; if (unlockedFlavors.ContainsKey(f)) { unlockedFlavors[f] = true; justUnlockedText.text = "Unlocked: " + FlavorTypeToString(f); } break; case ItemType.Item_TOPPING: ToppingType t = (ToppingType)item; if (unlockedToppings.ContainsKey(t)) { unlockedToppings[t] = true; justUnlockedText.text = "Unlocked: " + ToppingTypeToString(t); } break; default: break; } }
public void StartOrder() { numToppingsToOrder = Random.Range(0, 3); order = GameManager.Instance.GenerateOrder(numToppingsToOrder); orderBeans = order.beanType; orderMilk = order.milkType; orderSugar = order.sugarAmount; orderFlavor = order.flavor; orderToppings = order.toppings; numToppingsToOrder = orderToppings.Count; while (orderToppings.Contains(ToppingType.Topping_NONE)) { orderToppings.Remove(ToppingType.Topping_NONE); numToppingsToOrder = orderToppings.Count; } inUse = true; customerObject.SetActive(true); orderQuip = CreateOrderString(); }
public HistoryModel CreateSession(SessionType type) { HistoryModel historyModel; bool isUsed = true; MilkType milk = MilkType.Formula; if (type == SessionType.Pump) { isUsed = false; milk = MilkType.BreastMilk; } historyModel = new HistoryModel() { Id = Guid.NewGuid().ToString(), SessionType = type, IsUsed = isUsed, Storage = StorageType.Unspecified, Milk = milk }; historyModel.PropertyChanged += HistoryModel_PropertyChanged; return(historyModel); }
public void DisableBuffInfo(MilkType _type) { buffInfoItemList[(int)_type].gameObject.SetActive(false); }
public void UpdateBuffUI(float _now, float _max, MilkType _type) { buffInfoItemList[(int)_type].UpdateMilkGauge(_now, _max); }
/// <summary> /// Takes in a milk choice and then sets it to that. Then progresses order to sugar. /// </summary> /// <param name="CurrentChoice"></param> private void MilkSelection(MilkType CurrentChoice) { currentMilkChoice = CurrentChoice; Debug.Log(currentMilkChoice.ToString() + " Selected"); currentOrderStatus = OrderStatus.AskForSugar; }
public void SetMilkType(MilkType milk) { milkType = milk; }
public static double GetDensity(double massConcentraiton, double temperature, MilkType milkType) { temperature = temperature - 273.15; //MaterialComponent dryMatComponent = materialComponents[0] as MaterialComponent; //double dryMatFraction = dryMatComponent.GetMassFractionValue(); double a = 0; double b = 0; double c = 0; if (milkType == MilkType.SkimMilk) { a = ChartUtil.GetInterpolateValue(skimMilkA, temperature); b = ChartUtil.GetInterpolateValue(skimMilkB, temperature); c = ChartUtil.GetInterpolateValue(skimMilkC, temperature); } else if (milkType == MilkType.WholeMilk) { a = ChartUtil.GetInterpolateValue(skimMilkA, temperature); b = ChartUtil.GetInterpolateValue(skimMilkB, temperature); } double density = a + b * massConcentraiton + c * massConcentraiton * massConcentraiton; return(1000 * density); }