Esempio n. 1
0
    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();
    }
Esempio n. 2
0
 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();
 }