public void InitializeAffinities(Action <RewardAffinity> callback)
 {
     for (int i = 0; i < (int)RewardAffinity.LENGTH; i++)
     {
         RewardAffinity affinity   = (RewardAffinity)i;
         AffinityUI     affinityUI = Instantiate(affinityPrefab, affinityParent);
         affinityUI.Initialize(affinity, callback);
     }
 }
示例#2
0
 public void Initialize(RewardAffinity affinity, Action <RewardAffinity> callback)
 {
     nameText.SetText(AffinityUI.AffinityToString(affinity));
     this.callback = callback;
     this.affinity = affinity;
 }