void InitCategories() { m_CategoryScroll.Clear(); CocoRoleDressSceneHolder tSceneHolder = roleControl.CurRole.Dress.GetDressSceneHolder("common"); m_CategoryItemDic = tSceneHolder.CategoryItemHolderDic; string[] categoryList = GetCategoryList("common"); GameDollCategoryButton FirstButton = null; for (int i = 0; i < categoryList.Length; i++) { GameDollCategoryButton button = GameDollCategoryButton.Create(categoryList [i], m_CategoryScroll.GridGroup.transform); m_CategoryObj.Add(button.gameObject); if (FirstButton == null) { FirstButton = button; } } m_CategoryScroll.GridGroup.spacing = new Vector2(0, 20); m_CategoryScroll.InitSize(); if (FirstButton != null) { dressupCategoryBtnClickSignal.Dispatch(FirstButton); } }
public static GameDollCategoryButton Create(string catergoryID, Transform parent) { GameDollCategoryButton button = CocoLoad.Instantiate <GameDollCategoryButton> (DefaultDressupCategoryPath, parent); button.InitInfo(catergoryID); return(button); }
private void OnDressupCategoryBtnClick(GameDollCategoryButton pBtn) { if (pBtn.DressupCategoryData.CategoryID == DressupCategoryData.CategoryID) { m_IsSelect = true; } else { m_IsSelect = false; } ChangeStatus(); }
private void OnDressupCategoryBtnClick(GameDollCategoryButton pBtn) { StartCoroutine(UpdateItemList(pBtn.DressupCategoryData)); }
private void OnCategoryBtnClick(GameDollCategoryButton button) { m_CurCategory = button.DressupCategoryData.CategoryID; ResetCameraAndCharaceter(m_CurCategory); }