void Awake() { switcher = gameObject.GetComponent<CameraSwitcher>(); fireRadiusTrigger = GameObject.FindGameObjectWithTag(TagManager.FIRE_RADIUS_TRIGGER); control = GameObject.FindGameObjectWithTag(TagManager.PLAYER).GetComponent<PlayerControl>(); extinguishable = true; drinkLogic = GameObject.FindGameObjectWithTag(TagManager.PLAYER).GetComponent<DrinkLogic>(); extinguishable = true; urin = GameObject.FindGameObjectWithTag(TagManager.URINSTRAHL).GetComponent<ParticleSystem>(); }
public HttpResponseMessage Put([FromBody]IEnumerable<DrinkModel> data) { var logic = new DrinkLogic(); logic.Update(data); var result = new { success = true, message = "" }; return Request.CreateResponse(HttpStatusCode.OK, result); }
static void Main(string[] args) { var paymentOption = new PaymentOption(); DrinkLogic.DisplayDrinks(); FoodLogic.DisplayFoods(); var customer1 = new UserType("Ben", 2); var UserI = new UserInterfaceLogic(customer1); var items = UserI.BuyItems(); CalculationLogic cal = new CalculationLogic(items, customer1); Console.WriteLine("Your total cost is :" + cal.CalculateFinalCost()); StoreLogic.CheckQuantity(4); paymentOption.PayOption(cal.CalculateFinalCost()); Console.ReadKey(); }
/// <summary> /// When clicking the button to add drinks, run through every combo box and run /// the method to create drink objects for every drink at once. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAddDrinks_Click(object sender, EventArgs e) { drinks.Clear(); if (nudDrinksCoke.Value > 0) { drinks.Add(DrinkLogic.CreateDrink("Coke", (int)nudDrinksCoke.Value)); } if (nudDrinksPepsi.Value > 0) { drinks.Add(DrinkLogic.CreateDrink("Pepsi", (int)nudDrinksPepsi.Value)); } if (nudDrinksDietCoke.Value > 0) { drinks.Add(DrinkLogic.CreateDrink("Diet Coke", (int)nudDrinksDietCoke.Value)); } if (nudDrinks7Up.Value > 0) { drinks.Add(DrinkLogic.CreateDrink("7-Up", (int)nudDrinks7Up.Value)); } if (nudDrinksFanta.Value > 0) { drinks.Add(DrinkLogic.CreateDrink("Fanta", (int)nudDrinksFanta.Value)); } if (nudDRinksTango.Value > 0) { drinks.Add(DrinkLogic.CreateDrink("Tango", (int)nudDRinksTango.Value)); } PopulateDrinkListBox(); btnAddDrinks.Text = "Update Drink(s)"; }
// Use this for initialization void Start() { butRect = new Rect ((Screen.width - width) / 2, 0, width, height); moneyManagement = GameObject.FindGameObjectWithTag(TagManager.PLAYER).GetComponent<MoneyManagement>(); player = GameObject.FindGameObjectWithTag(TagManager.PLAYER); control = player.GetComponent<PlayerControl>(); drinkLogic = player.GetComponent<DrinkLogic>(); }