Пример #1
0
    public IEnumerator LoadCategories(JSONNode categories)
    {
        ClearCatregories();
        for (int i = 0; i < categories.Count; i++)
        {
            CategoriesHolder instantiatedCategory = null;
            yield return(new WaitUntil(() => InstantiateCategories(out instantiatedCategory)));

            instantiatedCategory.AssignData(categories[i]);
            instantiatedCategory.CategorySelected = CategorySelected;
            _instantiatedCategories.Add(instantiatedCategory);
        }

        _isLoaded = true;
    }
Пример #2
0
 private bool InstantiateCategories(out CategoriesHolder categories)
 {
     categories = Instantiate(_categoriesPrefab, _categoriesHolder);
     return(true);
 }
Пример #3
0
 public override void Load()
 {
     Categories = CategoriesHolder.Load(FilePath);
 }