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); }
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]); } } }