Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        public static GameDollCategoryButton Create(string catergoryID, Transform parent)
        {
            GameDollCategoryButton button = CocoLoad.Instantiate <GameDollCategoryButton> (DefaultDressupCategoryPath, parent);

            button.InitInfo(catergoryID);
            return(button);
        }
Esempio n. 3
0
        private void OnDressupCategoryBtnClick(GameDollCategoryButton pBtn)
        {
            if (pBtn.DressupCategoryData.CategoryID == DressupCategoryData.CategoryID)
            {
                m_IsSelect = true;
            }
            else
            {
                m_IsSelect = false;
            }

            ChangeStatus();
        }
Esempio n. 4
0
 private void OnDressupCategoryBtnClick(GameDollCategoryButton pBtn)
 {
     StartCoroutine(UpdateItemList(pBtn.DressupCategoryData));
 }
Esempio n. 5
0
 private void OnCategoryBtnClick(GameDollCategoryButton button)
 {
     m_CurCategory = button.DressupCategoryData.CategoryID;
     ResetCameraAndCharaceter(m_CurCategory);
 }