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(); GetComponent <Text>().text = String.Format("{0:0}%", 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()); }
private void Update() { if (fighter.GetTarget() == null) { GetComponent <Text>().text = "N/A"; } else { var health = fighter.GetTarget(); GetComponent <Text>().text = string.Format("{0}/{1}", health.HealthPoints, health.MaxHealthPoints); } }
private void Update() { if (fighter.GetTarget() == null) { GetComponent <Text>().text = "-/-"; } else { Health health = fighter.GetTarget(); GetComponent <Text>().text = string.Format("{0:0}/{1:0}", health.GetCurrentHealthPoints(), health.GetMaxHealthPoints()); } }
private void Update() { fighter = GameObject.FindWithTag("Player").GetComponent <Fighter>(); if (fighter.GetTarget() != null) { gameObject.GetComponent <Text>().text = String.Format("{0:0}%", fighter.GetTarget().GetPrcentage()); } else { gameObject.GetComponent <Text>().text = "none"; } }
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() { //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()); }
void Update() { Health target = fighter.GetTarget(); if (target == null) { GetComponent <Text>().text = "N/A"; return; } GetComponent <Text>().text = string.Format("{0:0}/{1:0}", target.GetHealth(), target.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() { 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()); } }
// Update is called once per frame void Update() { _health = _player.GetTarget(); if (_health) { _healthDisplay.text = "Enemy: " + _health.GetHealth(); } else { _healthDisplay.text = "Enemy: N/A"; } }
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 health = fighter.GetTarget(); if (null != health) { GetComponent <Text>().text = $"{health.GetHealthPoints()} / {health.GetMaxHealthPoints()}"; } else { GetComponent <Text>().text = "N/A"; } }
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"; } }
private void Update() { Health targetHealth = fighter.GetTarget(); if (targetHealth != null) { GetComponent <Text>().text = string.Format("{0:0}%", targetHealth.GetHealthPercentage()); } else { GetComponent <Text>().text = "N/A"; return; } }
private void Update() { Health health = playerFighter.GetTarget(); if (health == null) { healthDisplay.text = ""; return; } maxHealth = health.GetMaxHealth(); currentHealth = health.GetCurrentHealth(); healthDisplay.text = String.Format("Enemy : {0:0}/{1:0}", currentHealth, maxHealth); }
// Update is called once per frame void Update() { Health enemyHealth = findEnemyTarget.GetTarget(); // reference to a potential target if (enemyHealth != null) { startingHealth = enemyHealth.show_current_health; enemyHealthPercentage.text = String.Format("{0:N1}%", enemyHealth.GetHealthPercentage()); } else { enemyHealthPercentage.text = "N/A"; } }
private void FixedUpdate() { GetComponent <Text>().text = _target.GetTarget() != null ? $"{_target.GetTarget().GetHealth().GetPercentage()}%" : "N/A"; }
// Update is called once per frame void Update() { Health health = target.GetTarget(); textDisplay.text = health ? String.Format($"{health.CurrentHealth}/{health.MaxHealth} {health.GetPercentage():0}%") : "N/A"; }
private void Update() { health = fighter.GetTarget(); SetHealthText(); }