Exemple #1
0
 public void RefreshStats()
 {
     healthDisplay.text = stats.health.ToString();
     healthBar.Find("Bar").localScale = new Vector3(stats.health / 100f, 1, 1);
     affinityDisplay.text             = stats.AffinityToText();
     affinityDisplay.color            = colors[stats.Affinity];
     augDisplay.text = stats.augment;
     apDisplay.text  = stats.APToText();
     staminaBar.Find("Bar").localScale = new Vector3(stats.stamina, 1, 1);
     strawbDisplay.text = stats.StrawbsToText();
     for (int i = 0; i < stats.maxAP - stats.ActionPoints; i++)
     {
         apBar.transform.GetChild(i).Find("Chunk").gameObject.SetActive(false);
     }
     for (int i = stats.maxAP - stats.ActionPoints; i < stats.maxAP; i++)
     {
         apBar.transform.GetChild(i).Find("Chunk").gameObject.SetActive(true);
     }
 }