/// <summary> /// 承受伤害 /// </summary> /// <param name="damage"></param> public void TakeDamage(float damage) { hp -= damage; Debug.Log(hp); //将血量显示在血量条上 showHp.SetEnemyHp(hp, maxHP); if (bb != null) { bb.SetValue("hp", hp); } }