Beispiel #1
0
        void Update()
        {
            healthFraction = health.GetHealthPoints() / health.GetMaxHealthPoints();

            EnableAndDisableCanvas();

            foreground.rectTransform.localScale = new Vector3(healthFraction, 1, 1);
        }
Beispiel #2
0
 private void Update()
 {
     if (!fighter.GetTarget())
     {
         healthDisplay.text = " N/A";
         return;
     }
     health             = fighter.GetTarget();
     healthDisplay.text = string.Format("{0:0}/{1:0}", health.GetHealthPoints(), health.GetMaxHealthPoints());
 }
Beispiel #3
0
        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());
        }
Beispiel #4
0
 private void Update()
 {
     targetHealth = player.GetTarget();
     if (targetHealth == null)
     {
         text.text = "N/A";
     }
     else
     {
         text.text = String.Format("{0:0}/{1:0}", targetHealth.GetHealthPoints().ToString(), targetHealth.GetMaxHealthPoints());
     }
 }
Beispiel #5
0
 private void DisplayHealthValue()
 {
     healthValue.SetText(String.Format("{0:0}/{1:0} ({2:0}%)", health.GetHealthPoints(), health.GetMaxHealth(), health.GetPercentage()));
 }
Beispiel #6
0
 void Update()
 {
     GetComponent <Text>().text = String.Format("{0:0}/{1:0}", health.GetHealthPoints(), health.GetMaxHealthPoints());
 }
Beispiel #7
0
 void Update()
 {
     healthValue.text = String.Format("{0:0}/{1:0}",
                                      health.GetHealthPoints(), health.GetMaxHealthPoints());
 }
 private void Update()
 {
     healthDisplay.text = string.Format("{0:0}/{1:0}", health.GetHealthPoints(), health.GetMaxHealthPoints());
 }
Beispiel #9
0
 private void Update()
 {
     this.GetComponent <Text>().text = $"{health.GetHealthPoints():0}/{health.GetMaxHealthPoints():0}";
 }
 private void Update()
 {
     //Health verisi isteidğmiiz formatta ekrandaki text e yazdırdık
     GetComponent <Text>().text = String.Format("{0:0}/{1:0}", health.GetHealthPoints(), health.GetMaxHealthPoints());
 }
 private void Update()
 {
     // update text with format - : 0.0 is decimal places
     GetComponent <Text>().text = String.Format("{0:0.0}%/{1:0}", health.GetHealthPoints(), health.GetMaxHealthPoints());
 }
Beispiel #12
0
 private void Update()
 {
     // Display health percentage and automatically update
     m_text.text = $"{m_health.GetHealthPoints():0}/{m_health.GetMaxHealthPoints():0}";
 }
Beispiel #13
0
 private void Update()
 {
     //GetComponent<Text>().text = String.Format("{0:0.0}%", health.GetPercentage());
     GetComponent <Text>().text = String.Format("{0:0.0}/{1:0}", health.GetHealthPoints(), health.GetMaxHealthPoints());
 }
Beispiel #14
0
 private void Update()
 {
     text.text = String.Format("{0:0}/{1:0}", health.GetHealthPoints().ToString(), health.GetMaxHealthPoints());
 }
Beispiel #15
0
 private void SetHealthText()
 {
     GetComponent <Text>().text = System.String.Format("{0:0}/{1:0}", health.GetHealthPoints(), health.GetMaxHealth());
 }