Exemplo n.º 1
0
        private void RefreshEquipment()
        {
            roleRoot.SetActive(false);

            gameObject.GetComponent <Image>().color = new Color(1, 1, 1, 0);
            CommonEquipmentIcon icon = GetComponentInChildren <CommonEquipmentIcon>();

            if (icon == null)
            {
                icon = CommonEquipmentIcon.Create(transform);
            }
            icon.SetGameResData(_GameResData);
            _commonEquipIcon = icon;
            if (roleTypeIconImage != null)
            {
                roleTypeIconImage.gameObject.SetActive(false);
            }
            SetName(Localization.Get(_commonEquipIcon.EquipmentInfo.equipmentData.name));

            if (_commonHeroIcon != null)
            {
                _commonHeroIcon.gameObject.SetActive(false);
            }
            if (_commonEquipIcon != null)
            {
                _commonEquipIcon.gameObject.SetActive(true);
            }
            if (_commonItemIcon != null)
            {
                _commonItemIcon.gameObject.SetActive(false);
            }
        }