// Setup of the prefab
 public void Setup(Badge Bdg, ProfileBadge ProfBdg)
 {
     this.BadgeIcon.sprite = BadgeDict.GetSprite(Bdg.SpriteId);
     this._Parent          = ProfBdg;
     this._Badge           = Bdg;
     this.ButtonComponent.onClick.AddListener(this.PopUp);
 }
예제 #2
0
 // Awake will get the scripts for the transforms that was specified in the Unity control panel
 void Awake()
 {
     this._AchScript   = transform.FindChild("AchievementBox").GetComponent <ProfileAchievement> ();
     this._BadgeScript = transform.FindChild("BadgeBox").GetComponent <ProfileBadge> ();
     this._InfScript   = transform.FindChild("ProfileInfo").GetComponent <ProfileInfo> ();
 }