예제 #1
0
    void SetAllRecipes()
    {
        cockList = GameManager.Game.CocktailList;
        for (int i = 0; i < cockList.Count; i++)
        {
            GameObject       gameObject = GameManager.Resource.Instantiate("UI/Others/CocktailInfoCard", contents);
            CocktailInfoCard component  = gameObject.GetOrAddComponent <CocktailInfoCard>();
            component.MyCocktail = cockList[i];
            filteringList.Add(cockList[i]);
            cocktailInfo.Add(component);
        }

        SetFilteredRecipes();
    }
예제 #2
0
    void SetAllRecipes()
    {
        cockList = GameManager.Data.CocktailList;
        for (int i = 0; i < cockList.Count; i++)
        {
            GameObject       gameObject = GameManager.Resource.Instantiate("UI/Others/CocktailInfoCard", contents);
            CocktailInfoCard component  = gameObject.GetOrAddComponent <CocktailInfoCard>();
            component.MyCocktail = cockList[i];
            cocktailInfo.Add(component);
        }

        int height = cockList.Count / 4;

        if ((cockList.Count % 4) != 0)
        {
            height++;
        }
        contents.sizeDelta = new Vector2(0f, (520f * height) + 20f);
    }