Exemplo n.º 1
0
    /// <summary>
    /// grabs the next object from the unused collection and generates a new order from it
    /// </summary>
    private void GenerateNewOrder()
    {
        if (Unused.Count == 0)
        {
            return;
        }
        var          poppedObject = Unused.First();
        Burger       burger       = poppedObject.Key;
        BurgerVisual burgerVis    = poppedObject.Value.GetComponentInChildren <BurgerVisual>();

        Unused.Remove(burger);
        burger.InitBurger(pseudoRand);
        burgerVis.UpdateBurgerImages(burger);
        Used.Add(poppedObject.Key, poppedObject.Value);
        poppedObject.Value.SetActive(true);
    }