//加载数据
        private void LoadData()
        {
            this.dockView.ClearAllChild();
            this.buttons     = new List <AccessoryTypeButton>();
            this.pageCounter = new PageCounter();
            for (int i = 0; i < this.stores.Count; i++)
            {
                AccessoryTypeButton typeButton = GameObject.Instantiate(this.buttonPrefab, this.dockView.transform);
                typeButton.name = string.Format("Scene_{0}", this.stores[i]);
                typeButton.Initialize(this.stores[i],
                                      prefabRoot.GetObjectNoInstantiate <Sprite>("Texture/PetDress/Types", string.Format("{0}_small", this.typeIcons[this.stores[i]])),
                                      prefabRoot.GetObjectNoInstantiate <Sprite>("Texture/PetDress/Types", string.Format("{0}_big", this.typeIcons[this.stores[i]])));

                this.buttons.Add(typeButton);
                this.dockView.AddChild(typeButton.GetComponent <RectTransform>());
            }

            AccessoryTypeButton backButton = GameObject.Instantiate(this.buttonPrefab, this.dockView.transform);

            backButton.name = "Back";
            backButton.Initialize(-1, this.normalBackImage, this.largeBackImage);
            this.buttons.Add(backButton);
            this.dockView.AddChild(backButton.GetComponent <RectTransform>());
            this.dockView.UpdateItemPosition();
            this.pageCounter.Reset(this.buttons.Count, 6);
            this.pageCounter.Locate(lastIndex);
        }
        //加载数据
        public void LoadData(int typeIndex, List <Accessory> accessories)
        {
            this.typeIndex = typeIndex;
            this.bubbleView.ClearAllChild();
            this.buttons = new List <AccessoryButton>();
            List <string> petAccessories = this.localPetAccessoryAgent.GetPetAccessories(this.playerDataManager.CurrentPet);

            if (accessories != null && accessories.Count > 0)
            {
                this.pageCounter = new PageCounter();
                for (int i = 0; i < accessories.Count; i++)
                {
                    if (accessories[i].Cash && this.playerDataManager.GetLanguage().ToUpper() != LanConfig.Languages.ChineseSimplified)
                    {
                        continue;
                    }

                    AccessoryButton accessoryButton = GameObject.Instantiate(this.buttonPrefab, this.bubbleView.transform);
                    accessoryButton.name = string.Format("Accessory_{0}", accessories[i].ID);
                    accessoryButton.Initialize(accessories[i],
                                               prefabRoot.GetObjectNoInstantiate <Sprite>("Texture/PetDress/Accessories", string.Format("{0}_small", accessories[i].Icon)),
                                               prefabRoot.GetObjectNoInstantiate <Sprite>("Texture/PetDress/Accessories", string.Format("{0}_big", accessories[i].Icon)),
                                               this.playerDataManager.playerLevel < accessories[i].Level, !accessories[i].Suitable(this.playerDataManager.CurrentPet),
                                               this.accessoryDataManager.HasItem(accessories[i].ID), petAccessories.Contains(accessories[i].ID.ToString()));
                    accessoryButton.SetText(this.i18nConfig);
                    this.buttons.Add(accessoryButton);
                    this.bubbleView.AddChild(accessoryButton.GetComponent <RectTransform>());
                }
                this.bubbleView.UpdateItemPosition();
                this.pageCounter.Reset(this.buttons.Count, this.buttons.Count);
                this.pageCounter.Locate(lastIndex.ContainsKey(typeIndex) ? lastIndex[typeIndex] : 0);
                this.ChangeButton(true);
            }
        }