public string FlavorTypeToString(FlavorShot fs)
    {
        switch (fs)
        {
        case FlavorShot.Flavor_MOCHA:
            return("Mocha (M)");

        case FlavorShot.Flavor_PUMPKIN_SPICE:
            return("Pumpkin Spice (Ps)");

        case FlavorShot.Flavor_VANILLA:
            return("Vanilla (V)");

        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();
 }
Exemplo n.º 4
0
 public void SetFlavorShot(FlavorShot shot)
 {
     flavor = shot;
 }