public static GameDollItemButton Create(string prefabsPath, CocoRoleDressItemHolder item, Transform parent, string categoryName) { GameDollItemButton button = CocoLoad.Instantiate <GameDollItemButton> (prefabsPath, parent); button.InitInfo(item, categoryName); return(button); }
private void OnItemBtnClick(GameDollItemButton button) { string tCategoryID = button.DressupItemData.LinkedDressItemHolder.ParentHolder.id; ResetCameraAndCharaceter(tCategoryID); PlayCharacterAnimation(dressupData.GetCategoryData(tCategoryID).m_Animation); }
void InitCategoryItems(CocoDressupCategoryData data) { m_ItemScroll.GridGroup.SetInfo(data.m_ItemGridInfo); List <CocoRoleDressItemHolder> itemDataList = m_CategoryItemDic [data.CategoryID]; itemDataList = GetItemList(itemDataList, data.CategoryID); m_ButtonList.Clear(); if (itemDataList != null) { for (int i = 0; i < itemDataList.Count; i++) { #region fix CocoRoleDressItemHolder itemHolder = itemDataList[i]; // Debug.LogError ("itemHolder id : " + itemHolder.id); // int index = i-1; // if (index> 0) { // switch (index % 3) { // case 0: // itemHolder.lockType = CocoLockType.Non; // break; // case 1: // itemHolder.lockType = CocoLockType.RV; // break; // case 2: // itemHolder.lockType = CocoLockType.IAP; // break; // default: // itemHolder.lockType = CocoLockType.Non; // break; // } // } else { // itemHolder.lockType = CocoLockType.Non; // } // // if (data.m_LockType == CocoLockType.RV){ // itemHolder.lockType = CocoLockType.Non; // } itemHolder.order = i; #endregion GameDollItemButton button = GameDollItemButton.Create(data.m_ItemPrefabsPath, itemHolder, m_ItemScroll.GridGroup.transform, data.CategoryID); m_ButtonList.Add(button.gameObject); } } m_ItemScroll.InitSize(); m_ItemScroll.SetGridEnable(true); }
private void OnDressupItemBtnClick(GameDollItemButton button) { ChangeStatus(); }