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());
        }
Esempio n. 3
0
        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());
        }
Esempio n. 4
0
 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);
     }
 }
Esempio n. 5
0
 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());
     }
 }
Esempio n. 6
0
        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";
            }
        }
Esempio n. 7
0
        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());
        }
Esempio n. 8
0
        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());
        }
Esempio n. 10
0
        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()));
        }
Esempio n. 11
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());
            }
        }
Esempio n. 12
0
        // Update is called once per frame
        void Update()
        {
            _health = _player.GetTarget();

            if (_health)
            {
                _healthDisplay.text = "Enemy: " + _health.GetHealth();
            }
            else
            {
                _healthDisplay.text = "Enemy: N/A";
            }
        }
Esempio n. 13
0
        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());
        }
Esempio n. 14
0
        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";
            }
        }
Esempio n. 15
0
        private void Update()
        {
            Health health = fighter.GetTarget();

            if (null != health)
            {
                GetComponent <Text>().text = $"{health.GetHealthPoints()} / {health.GetMaxHealthPoints()}";
            }
            else
            {
                GetComponent <Text>().text = "N/A";
            }
        }
Esempio n. 16
0
        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";
            }
        }
Esempio n. 17
0
        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;
            }
        }
Esempio n. 18
0
        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);
        }
Esempio n. 19
0
        // 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";
 }
Esempio n. 21
0
        // 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";
        }
Esempio n. 22
0
 private void Update()
 {
     health = fighter.GetTarget();
     SetHealthText();
 }