private void OnEnable()
        {
            for (int i = 0; i < SurvivorModel.AllModels.Count; i++)
            {
                if (createdIcons.Count < SurvivorModel.AllModels.Count)
                {
                    CreateNewSurvivorIcon();
                }

                SurvivorAssignIcon icon = createdIcons[i];
                icon.Model = SurvivorModel.AllModels[i];
                icon.CreateHeadshot();
                icon.UpdateView();
                icon.SetActive(true);
            }

            if (SurvivorModel.AllModels.Count < createdIcons.Count)
            {
                for (int i = SurvivorModel.AllModels.Count; i < createdIcons.Count; i++)
                {
                    createdIcons[i].SetActive(false);
                }
            }
        }
示例#2
0
 public SurvivorIconClickedEvent(SurvivorAssignIcon icon)
 {
     Icon = icon;
 }
 public SurvivorIconUnhoveredEvent(SurvivorAssignIcon icon)
 {
     Icon = icon;
 }