/// <summary> /// Selects the Topping Case to enable putting a topping onto a pizza /// </summary> /// <param name="topping"></param> private void ToppingSelector(ToppingController topping) { var toppingObj = topping.toppingObject; if (topping.dirtyTopping) { isDirty = true; } switch (topping.toppingType) { case TOPPING.Roni: PizzaAddRoniTopping(toppingObj); break; case TOPPING.Bacon: PizzaAddBaconTopping(toppingObj); break; case TOPPING.Peppers: PizzaAddPeppersTopping(toppingObj); break; case TOPPING.Mushrooms: PizzaAddMushroomsTopping(toppingObj); break; default: break; } }
/// <summary> /// If-Else Statement for Adding Cheese Before Able to Add Other Toppings /// </summary> /// <param name="topping"></param> private void PizzaAddCheeseTopping(ToppingController topping) { switch (topping.toppingType) { case TOPPING.Cheese: activePizzaTexture = resourceLoader.cheeseMaterial; textureChange = true; if (topping.dirtyTopping) { isDirty = true; } Destroy(topping.toppingObject); break; default: break; } }