修改bug
This commit is contained in:
@@ -131,12 +131,24 @@ namespace ScrewsMaster
|
||||
// var addPrice = ConfigSystem.GetConfig<CommonModel>().Purchaseprops;
|
||||
// var mergePrice = ConfigSystem.GetConfig<CommonModel>().Purchaseprops;
|
||||
// var cleanPrice = ConfigSystem.GetConfig<CommonModel>().Purchaseprops;
|
||||
_payBoxPrice = (int)ConfigSystem.GetConfig<CommonModel>().addspace;
|
||||
|
||||
|
||||
if (type != 3)
|
||||
{
|
||||
_payBoxPrice = 1;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 1)
|
||||
{
|
||||
_payBoxPrice = (int)ConfigSystem.GetConfig<CommonModel>().addspace;
|
||||
}
|
||||
else
|
||||
{
|
||||
_payBoxPrice = (int)ConfigSystem.GetConfig<CommonModel>().addspace2;
|
||||
}
|
||||
}
|
||||
|
||||
// if (ui.btn_add is btn_revive btnAdd) btnAdd.txt_coin.text = addPrice.ToString();
|
||||
// ui.btn_add.onClick.Add(() =>
|
||||
@@ -203,7 +215,7 @@ namespace ScrewsMaster
|
||||
if (success)
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.use_prop, type);
|
||||
// GameHelper.AddAdWatchCount(-_payBoxPrice);
|
||||
// GameHelper.AddAdWatchCount(-_payBoxPrice);
|
||||
SetButtonsTouchable(false);
|
||||
CtrlCloseUI();
|
||||
ShowScrews.Instance.ShowToast("Successfully used the props");
|
||||
@@ -242,7 +254,11 @@ namespace ScrewsMaster
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (num == 2 && !GameHelper.GetPayBox1())
|
||||
{
|
||||
GameHelper.ShowTips("Please unlock the first one");
|
||||
return;
|
||||
}
|
||||
if (GameHelper.CheckAdWatchCount(_payBoxPrice))
|
||||
{
|
||||
GameHelper.AddAdWatchCount(-_payBoxPrice);
|
||||
|
||||
@@ -138,8 +138,15 @@ namespace ScrewsMaster
|
||||
ui.btn_cash.title = "Go";
|
||||
ui.btn_cash.SetClick(() =>
|
||||
{
|
||||
|
||||
|
||||
var level = ShowScrews.Instance.gameMode == GameHome.Mode_difficult ? 1 : GameHelper.GetLevel(); ;
|
||||
ShowScrews.Instance.InitLogic(level);
|
||||
|
||||
AudioManager.Instance.PlayBGM(AudioConst.PlayingBg);
|
||||
CtrlCloseUI();
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Open, false);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.GameHomeUI_Close);
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Open, false);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace ScrewsMaster
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
// HallManager.Instance.UpdateSecondEvent -= GameHelper.addGameTime;
|
||||
// HallManager.Instance.UpdateSecondEvent -= GameHelper.addGameTime;
|
||||
HallManager.Instance.UpdateSecondEvent -= TimeEvent;
|
||||
HallManager.Instance.UpdateSecondEvent -= UpData;
|
||||
HallManager.Instance.UpdateEvent -= UpdateEvent;
|
||||
@@ -89,7 +89,7 @@ namespace ScrewsMaster
|
||||
// ui.btn_h5.visible = showH5Btn;
|
||||
|
||||
|
||||
ui.money.visible = ui.gold.red.visible = ui.btn_look_ad.visible = GameHelper.IsGiftSwitch();
|
||||
ui.money.visible = ui.gold.red.visible = ui.btn_look_ad.visible = GameHelper.IsGiftSwitch();
|
||||
|
||||
ui.btn_menu.touchable = false;
|
||||
SetAvatar();
|
||||
@@ -381,7 +381,7 @@ namespace ScrewsMaster
|
||||
{
|
||||
//CreatSheepCard.instance.SetCameraVisible(false);
|
||||
|
||||
// CtrlDispatcher.Instance.Dispatch(CtrlMsg.Webview_StateChange, WebUIType.H5);
|
||||
// CtrlDispatcher.Instance.Dispatch(CtrlMsg.Webview_StateChange, WebUIType.H5);
|
||||
|
||||
uiCtrlDispatcher.Dispatch(UICtrlMsg.H5UI_Open);
|
||||
GameHelper.showGameUI = false;
|
||||
@@ -473,8 +473,8 @@ namespace ScrewsMaster
|
||||
if (!GameHelper.IsGiftSwitch()) return;
|
||||
|
||||
var probability = GameHelper.GetCommonModel().Smallrewardsrate;
|
||||
var range = Random.Range(0, 101);
|
||||
if (range > probability) return;
|
||||
var range = Random.Range(0, 100);
|
||||
if (range >= probability) return;
|
||||
|
||||
reward_data temp = args as reward_data;
|
||||
|
||||
@@ -630,12 +630,12 @@ namespace ScrewsMaster
|
||||
_paidcoinsList ??= ConfigSystem.GetConfig<PaidcoinsModel>().dataList;
|
||||
|
||||
int time = SaveData.GetSaveobject()._goldtime0;
|
||||
if ( time + _paidcoinsList[0].receive_CD < GameHelper.GetNowTime())
|
||||
if (time + _paidcoinsList[0].receive_CD < GameHelper.GetNowTime())
|
||||
{
|
||||
ui.gold.state.selectedIndex = 2;
|
||||
ui.gold.red.visible = true;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
ui.gold.state.selectedIndex = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user