public void UpdateValues(BaseVillager villager) { characterPortrait = villager.GetPortrait(); characterName = villager.GetName(); characterLevel = villager.GetLevel(); panelPortrait.sprite = characterPortrait; panelName.text = characterName; panelLevel.text = "Level: " + characterLevel.ToString(); }
private void UpdateButton(int value, BaseVillager villager) { buttonList [value].GetComponentInChildren <Image> ().sprite = villager.GetPortrait(); buttonList [value].GetComponentsInChildren <Text> () [0].text = villager.GetName(); buttonList [value].GetComponentsInChildren <Text> () [1].text = villager.GetLevel().ToString(); }