Example #1
0
        public override void RefreshView()
        {
            RoleData roleData;
            Image    icon;

            for (int i = 0; i < icons.Count; i++)
            {
                icon = icons[i];
                if (roleDataList.Count > i)
                {
                    icon.gameObject.SetActive(true);
                    roleData    = roleDataList[i];
                    icon.sprite = Statics.GetIconSprite(roleData.IconId);
                    icon.color  = roleData.IsDie ? Color.red : Color.white;
                    if (roleData.Injury != InjuryType.None)
                    {
                        injuryImages[i].gameObject.SetActive(true);
                        injuryImages[i].color = Statics.GetInjuryColor(roleData.Injury);
                    }
                    else
                    {
                        injuryImages[i].gameObject.SetActive(false);
                    }
                }
                else
                {
                    icon.gameObject.SetActive(false);
                    injuryImages[i].gameObject.SetActive(false);
                }
            }
            RefreshRedPoint();
        }
Example #2
0
 public void RefreshView()
 {
     Icon.sprite = Statics.GetIconSprite(roleData.IconId);
     Name.text   = roleData.Name;
     InjuryImage.gameObject.SetActive(roleData.Injury != InjuryType.None);
     CureBtn.gameObject.SetActive(roleData.Injury != InjuryType.None);
     if (roleData.Injury != InjuryType.None)
     {
         InjuryImage.color = Statics.GetInjuryColor(roleData.Injury);
     }
 }