Beispiel #1
0
        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);
        }
Beispiel #2
0
        private void OnItemBtnClick(GameDollItemButton button)
        {
            string tCategoryID = button.DressupItemData.LinkedDressItemHolder.ParentHolder.id;

            ResetCameraAndCharaceter(tCategoryID);
            PlayCharacterAnimation(dressupData.GetCategoryData(tCategoryID).m_Animation);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
 private void OnDressupItemBtnClick(GameDollItemButton button)
 {
     ChangeStatus();
 }