Ejemplo n.º 1
0
    void SpawnOrder(int difficulty)
    {
        if (OrderQueue.Count == MaximumOrders)
        {
            return;
        }

        SoundBoard.Current.PlayOmeletteNewOrder();
        OrderQueue.Add(ObjectPooler.Current.Spawn <OrderDisplay>("OrderDisplay", x => {
            x.transform.SetParent(OrderDisplayContainer);
            x.transform.SetAsFirstSibling();
            x.transform.localScale = Vector3.one;
            x.Populate(OrderData.Generate(difficulty));
        }));
    }