private void SetHealthText() { if (health == null) { GetComponent <Text>().text = "N/A"; return; } GetComponent <Text>().text = System.String.Format("{0:0}/{1:0}", health.GetHealthPoints(), health.GetMaxHealth()); }
private void Update() { if (fighter.GetTarget() == null) { GetComponent <Text>().text = "N/A"; return; } Health health = fighter.GetTarget(); GetComponent <Text>().text = String.Format("{0:0}/{1:0}", health.GetHealthPoints(), health.GetMaxHealthPoints()); }
private void Update() { if (fighter.GetTarget() == null) { GetComponent <Text>().text = "N/A"; return; } Health health = fighter.GetTarget();//deve checar qual o inimigo em cada frame GetComponent <Text>().text = String.Format("{0:0}/{1:0}", health.GetHealthPoints(), health.GetMaxHealthPoints()); }
private void DisplayHealthValue() { health = playerFighter.GetTarget(); if (health == null) { healthValue.SetText("N/A"); return; } healthValue.SetText(String.Format("{0:0}/{1:0} ({2:0}%)", health.GetHealthPoints(), health.GetMaxHealth(), health.GetPercentage())); }
private void Update() { if (fighter.GetTarget() == null) // if no health information from target { GetComponent <Text>().text = "not available"; return; } // since we use RPG.Combat, we can specify using Resouces to use Health Health health = fighter.GetTarget(); // simply our fighter's target, which is also of type Health, GetPercentage gets the actual health v v GetComponent <Text>().text = String.Format("{0:0.0}%/{1:0}", health.GetHealthPoints(), health.GetMaxHealthPoints()); }
void Update() { if (fighter.GetTarget() == null) { healthValue.text = "N/A"; return; } Health health = fighter.GetTarget(); healthValue.text = String.Format("{0:0}/{1:0}", health.GetHealthPoints(), health.GetMaxHealthPoints()); }
private void Update() { if (m_fighter.Target == null) { m_text.text = "N/A"; return; } // Display health percentage and automatically update Health health = m_fighter.Target; m_text.text = $"{health.GetHealthPoints():0}/{health.GetMaxHealthPoints():0}"; }
private void Update() { Health health = fighter.GetTarget(); if (health == null) { GetComponent <Text>().text = String.Format("N/A"); } else { GetComponent <Text>().text = String.Format("{0:0} / {1:0}", health.GetHealthPoints(), health.GetMaxHealthPoints()); } }
private void Update() { enemy = fighter.GetTarget(); if (enemy == null) { healthDisplay.text = "N/A"; return; } enemyHealth = enemy.GetComponent <Health>(); healthDisplay.text = String.Format("{0:0}/{1:0}", enemyHealth.GetHealthPoints(), enemyHealth.GetMaxHealthPoints()); }
private void Update() { Health targetHealth = fighter.GetTarget(); if (targetHealth != null) { this.GetComponent <Text>().text = $"{targetHealth.GetHealthPoints():0}/{targetHealth.GetMaxHealthPoints():0}"; } else { this.GetComponent <Text>().text = "No Target"; } }
private void Update() { Health target = fighter.GetTarget(); if (target == null) { GetComponent <Text>().text = "N/A"; } else { GetComponent <Text>().text = String.Format("{0:0}/{1:0}", target.GetHealthPoints(), target.GetMaxHealthPoints()); } }
private void Update() { Health health = fighter.GetTarget(); if (null != health) { GetComponent <Text>().text = $"{health.GetHealthPoints()} / {health.GetMaxHealthPoints()}"; } else { GetComponent <Text>().text = "N/A"; } }
private void Update() { //bir hedef yoksa if (fighter.GetTarget() == null) { //herhangi bir can değeri gösterme GetComponent <Text>().text = "N/A"; return; } //hedefin health componentini aldık ve ekranda gösterdik Health health = fighter.GetTarget(); GetComponent <Text>().text = String.Format("{0:0}/{1:0}", health.GetHealthPoints(), health.GetMaxHealthPoints()); }
private void Update() { Health target = fighter.GetTarget(); if (target != null) { healthText.text = String.Format("{0:0}/{1:0}", target.GetHealthPoints(), target.GetMaxHealthPoints()); } else { healthText.text = "N/A"; } }