private void OnWeaponUpgradeClick() { int energy = mCamp.energyCountWeaponUpgrade; if (energy < 0) { mFacade.ShowMsg("武器已到最大等级,无法再进行升级"); return; } if (mFacade.TakeEnergy(energy)) { mCamp.UpdateWeapon(); ShowCampInfo(mCamp); } else { mFacade.ShowMsg("升级武器需要能量: " + energy + "能量不足,请稍后进行升级"); } }