Esempio n. 1
0
 public void LoadIcon(int equipmentId)
 {
     if (icon == null)
     {
         icon = this.GetComponent <Image>();
     }
     //icon.color = new Color32(255, 255, 255, 1);
     icon.sprite = ImageAssetBundleManager.GetEquipmentIcon(string.Format("{0}_{1}", equipmentType, equipmentId));
 }
Esempio n. 2
0
 public override void UpdateView()
 {
     if (ViewModel != null && ViewModel.EquipmentId.Value > 0)
     {
         icon.gameObject.SetActive(true);
         level.transform.parent.gameObject.SetActive(true);
         stars[0].transform.parent.gameObject.SetActive(true);
         icon.sprite = ImageAssetBundleManager.GetEquipmentIcon(string.Format("{0}_{1}", ViewModel.EquipmentType.Value, ViewModel.EquipmentId.Value));
         LevelChanged(0, ViewModel.Level.Value);
         level.transform.parent.gameObject.SetActive(!hideLevel);
     }
     else
     {
         icon.gameObject.SetActive(false);
         level.transform.parent.gameObject.SetActive(false);
         stars[0].transform.parent.gameObject.SetActive(false);
     }
 }