Example #1
0
        public EquipAvatar GetEquipModelsByPos(int pos)
        {
            EquipAvatar pModel = null;

            mEquipAvatars.TryGetValue(pos, out pModel);
            if (pModel == null)
            {
                pModel = new EquipAvatar();
                mEquipAvatars.Add(pos, pModel);
            }
            return(pModel);
        }
Example #2
0
        public void RemoveEquip(int pos)
        {
            EquipAvatar pModel = GetEquipModelsByPos(pos);

            for (int i = 0; i < pModel.Models.Length; i++)
            {
                if (pModel.Models[i] != null)
                {
                    pModel.Models[i].SetActive(false);
                    GameObject.Destroy(pModel.Models[i]);
                }
            }
        }