protected float hurtMoney;//受一次伤害的血量 // void IElementPlayer.GetHurt(){ //// print("hurt!"); // //每次受伤使自己资产减少0.9 // float outMoney = Mathf.Max (natureMoney + borrowMoney, .9f);//考虑一下减少资产是否可以使自己变为负数(目前设置的不能为负数) // MoneySystem.Instance.PlayerWorkEarnMoney (this, -outMoney); // } //void GetHurt(OtherPlayer otherPlayer) //{ // print("hurt!"); //} void Attack(OtherPlayer otherPlayer) { otherPlayer.GetHurt(); }