Beispiel #1
0
    public void SetupCategory()
    {
        categoryItemObjectPool.ReturnAllObjectsToPool();

        for (int i = 0; i < GuessManager.Instance.CategoryInfos.Count; i++)
        {
            CategoryInfo     categoryInfo     = GuessManager.Instance.CategoryInfos[i];
            CategoryListItem categoryListItem = gameObject.transform.GetChild(1).GetChild(i).transform.GetComponent <CategoryListItem>();
            categoryListItem.Setup(categoryInfo);
            categoryListItem.gameObject.SetActive(true);
        }
    }
Beispiel #2
0
    public override void OnShowing(object data)
    {
        categoryItemObjectPool.ReturnAllObjectsToPool();

        for (int i = 0; i < GameManager.Instance.CategoryInfos.Count; i++)
        {
            CategoryInfo categoryInfo = GameManager.Instance.CategoryInfos[i];

            // If its the daily puzzle category the don't show it in the list of categories
            if (categoryInfo.name == GameManager.dailyPuzzleId)
            {
                continue;
            }

            CategoryListItem categoryListItem = categoryItemObjectPool.GetObject().GetComponent <CategoryListItem>();

            categoryListItem.Setup(categoryInfo);
            categoryListItem.gameObject.SetActive(true);
        }
    }