示例#1
0
        private void Update()
        {
            if (fighter.GetTarget() == null)
            {
                GetComponent <Text>().text = "- -";
                return;
            }
            Health health = fighter.GetTarget();

            GetComponent <Text>().text = String.Format("{0:0}/{1:0}", health.GetHealthpoints(), health.GetMaxHealthPoints());
        }