取消金币

This commit is contained in:
2026-07-14 18:19:43 +08:00
parent 1f4c215d59
commit 2d1c510ae0
15 changed files with 197 additions and 161 deletions
@@ -108,9 +108,9 @@ namespace ScrewsMaster
{
ui.btn_back.SetClick(() => { });
ui.btn_close.SetClick(() => { });
ui.btn_revive.SetClick(() => { });
// ui.btn_revive.SetClick(() => { });
GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
GameHelper.SetIsWatchAd(1);
GameHelper.SetReviveCount();
GameHelper.SetReviveCount();
isRevive = true;
ctrl.CloseUI();
@@ -118,24 +118,24 @@ namespace ScrewsMaster
});
});
var revivalCoins = ConfigSystem.GetConfig<CommonModel>().RevivalCoins;
if (ui.btn_revive is btn_revive btnRevive) btnRevive.txt_coin.text = revivalCoins.ToString();
ui.btn_revive.onClick.Add(() =>
{
if (!GameHelper.CheckGoldNumber(revivalCoins))
{
GameHelper.ShowTips("Not Enough Coins");
return;
}
//消耗金币复活
GameHelper.AddGoldNumber(-revivalCoins);
GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
//CtrlCloseUI();
GameHelper.SetIsWatchAd(2);
GameHelper.SetReviveCount();
isRevive = true;
ctrl.CloseUI();
});
// var revivalCoins = ConfigSystem.GetConfig<CommonModel>().RevivalCoins;
// if (ui.btn_revive is btn_revive btnRevive) btnRevive.txt_coin.text = revivalCoins.ToString();
// ui.btn_revive.onClick.Add(() =>
// {
// if (!GameHelper.CheckGoldNumber(revivalCoins))
// {
// GameHelper.ShowTips("Not Enough Coins");
// return;
// }
// //消耗金币复活
// GameHelper.AddGoldNumber(-revivalCoins);
// GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
// //CtrlCloseUI();
// GameHelper.SetIsWatchAd(2);
// GameHelper.SetReviveCount();
// isRevive = true;
// ctrl.CloseUI();
// });
ui.btn_close.onClick.Add(() =>
{