Ejemplo n.º 1
0
 public void RefreshView(Character chara)
 {
     if (chara == null)
     {
         Clear();
         return;
     }
     Name.text       = chara._Name;
     Portrait.sprite = chara.UIIcon;
     HpBar.UpdateBar(chara.stats.CurrentHP / chara.stats.CalculatedHP);
 }
Ejemplo n.º 2
0
        public void SetDamagePreview(Stats TargetStats, Stats AttackerStats)
        {
            float val  = TargetStats.CurrentHP / TargetStats.CalculatedHP;
            float val2 = AttackerStats.HPAfterAttack(TargetStats) / TargetStats.CalculatedHP;

            HpBar.UpdateBar(val);
            HpPreview.UpdateBar(val2);
            HpPreview.gameObject.SetActive(true);

            HpBar.gameObject.AddComponent <UIImageFlicker>();
        }