コード例 #1
0
        // Update is called once per frame
        void Update()
        {
            healthDisplayText.text = health.GetCurrentHealth().ToString("000.0");

            //enemyHealthDisplayText.text = "N/A";
            //Health targetHealth = health.GetComponent<Fighter>().GetTarget();
            //if (targetHealth != null)
            //{
            //    enemyHealthDisplayText.text = targetHealth.GetCurrentHealth().ToString();
            //}
        }
コード例 #2
0
 private void Update()
 {
     healthDisplay.text     = String.Format("Health : {0:0}/{1:0}", health.GetCurrentHealth(), health.GetMaxHealth());
     experienceDisplay.text = String.Format("Experience : {0:0}", experience.GetExperience());
     levelDisplay.text      = String.Format("Level : {0:0}", playerStats.GetLevel());
 }
コード例 #3
0
 void Update()
 {
     healthText.text = "Health: " + Math.Round(health.GetCurrentHealth(), 0).ToString() + "/" + Math.Round(health.GetMaxHealth(), 0).ToString();
 }