提交
This commit is contained in:
@@ -1,65 +1,67 @@
|
||||
namespace ScrewsMaster
|
||||
{
|
||||
public static partial class GameMsg
|
||||
{
|
||||
public static readonly uint OpenGame = ++Cursor_BASE;
|
||||
public static readonly uint Update111Completed = ++Cursor_BASE;
|
||||
public static readonly uint BackMainScene = ++Cursor_BASE;
|
||||
public static readonly uint Update102Completed = ++Cursor_BASE;
|
||||
public static uint Slot_refresh = ++Cursor_BASE;
|
||||
public static uint Remake_state = ++Cursor_BASE;
|
||||
public static readonly uint MakeupSuccess = ++Cursor_BASE;
|
||||
public static partial class GameMsg
|
||||
{
|
||||
public static readonly uint OpenGame = ++Cursor_BASE;
|
||||
public static readonly uint Update111Completed = ++Cursor_BASE;
|
||||
public static readonly uint BackMainScene = ++Cursor_BASE;
|
||||
public static readonly uint Update102Completed = ++Cursor_BASE;
|
||||
public static uint Slot_refresh = ++Cursor_BASE;
|
||||
public static uint Remake_state = ++Cursor_BASE;
|
||||
public static readonly uint MakeupSuccess = ++Cursor_BASE;
|
||||
|
||||
public static uint Ad_success = ++Cursor_BASE;
|
||||
public static uint UpdateHotFixMax = ++Cursor_BASE;
|
||||
public static uint UpdateHotFixProgress = ++Cursor_BASE;
|
||||
public static readonly uint RefreshTodoUI = ++Cursor_BASE;
|
||||
public static readonly uint RefreshMakeupData = ++Cursor_BASE;
|
||||
public static uint Gold_refresh = ++Cursor_BASE;
|
||||
public static uint Sheep_item_refresh = ++Cursor_BASE;
|
||||
public static uint card_click = ++Cursor_BASE;
|
||||
public static uint Ad_success = ++Cursor_BASE;
|
||||
public static uint UpdateHotFixMax = ++Cursor_BASE;
|
||||
public static uint UpdateHotFixProgress = ++Cursor_BASE;
|
||||
public static readonly uint RefreshTodoUI = ++Cursor_BASE;
|
||||
public static readonly uint RefreshMakeupData = ++Cursor_BASE;
|
||||
public static uint Gold_refresh = ++Cursor_BASE;
|
||||
public static uint Sheep_item_refresh = ++Cursor_BASE;
|
||||
public static uint card_click = ++Cursor_BASE;
|
||||
|
||||
public static uint RefreshADTask = ++Cursor_BASE;
|
||||
public static readonly uint GetReward = ++Cursor_BASE;
|
||||
public static readonly uint ProcessReward = ++Cursor_BASE;
|
||||
public static uint RefreshADTask = ++Cursor_BASE;
|
||||
public static readonly uint GetReward = ++Cursor_BASE;
|
||||
public static readonly uint ProcessReward = ++Cursor_BASE;
|
||||
|
||||
public static readonly uint Update101 = ++Cursor_BASE;
|
||||
public static readonly uint MakeUpConfirmUIClosed = ++Cursor_BASE;
|
||||
public static readonly uint Update101 = ++Cursor_BASE;
|
||||
public static readonly uint MakeUpConfirmUIClosed = ++Cursor_BASE;
|
||||
|
||||
public static readonly uint Update111 = ++Cursor_BASE;
|
||||
public static uint reset_game = ++Cursor_BASE;
|
||||
public static uint GetTaskReward = ++Cursor_BASE;
|
||||
public static uint google_pay_success = ++Cursor_BASE;
|
||||
public static uint apple_pay_success = ++Cursor_BASE;
|
||||
public static uint pack_close = ++Cursor_BASE;
|
||||
public static uint PaySuccess = ++Cursor_BASE;
|
||||
public static uint resetH5progress = ++Cursor_BASE;
|
||||
public static uint GotoH5 = ++Cursor_BASE;
|
||||
public static uint RefreshGame = ++Cursor_BASE;
|
||||
public static uint FlyGold = ++Cursor_BASE;
|
||||
public static uint RefreshLookAd = ++Cursor_BASE;
|
||||
|
||||
|
||||
public static uint RefreshItemCount = ++Cursor_BASE;
|
||||
|
||||
public static readonly uint H5ViewClickBtn = ++Cursor_BASE;
|
||||
public static readonly uint Update111 = ++Cursor_BASE;
|
||||
public static uint reset_game = ++Cursor_BASE;
|
||||
public static uint GetTaskReward = ++Cursor_BASE;
|
||||
public static uint google_pay_success = ++Cursor_BASE;
|
||||
public static uint apple_pay_success = ++Cursor_BASE;
|
||||
public static uint pack_close = ++Cursor_BASE;
|
||||
public static uint PaySuccess = ++Cursor_BASE;
|
||||
public static uint resetH5progress = ++Cursor_BASE;
|
||||
public static uint GotoH5 = ++Cursor_BASE;
|
||||
public static uint RefreshGame = ++Cursor_BASE;
|
||||
public static uint FlyGold = ++Cursor_BASE;
|
||||
public static uint RefreshLookAd = ++Cursor_BASE;
|
||||
|
||||
|
||||
public static uint BattleLevelUp = ++Cursor_BASE;//通行证等级提升
|
||||
public static uint PayBattlePass = ++Cursor_BASE;//购买通行证
|
||||
public static uint AdWatchCountUpdated = ++Cursor_BASE;//看广告次数变化
|
||||
public static uint AdRewardClaimed = ++Cursor_BASE;//广告奖励已领取
|
||||
public static uint BuyRemoveAdPack = ++Cursor_BASE;//购买免广告礼包
|
||||
public static uint BuyPack = ++Cursor_BASE;//购买普通礼包
|
||||
public static uint resurgence = ++Cursor_BASE;
|
||||
public static uint resurgence_close = ++Cursor_BASE;
|
||||
public static uint RefreshSaveingPot = ++Cursor_BASE;
|
||||
public static uint hideBroadCast = ++Cursor_BASE;
|
||||
public static uint showBroadCast = ++Cursor_BASE;
|
||||
public static uint updateRecordList = ++Cursor_BASE;
|
||||
public static uint rewardMul_close = ++Cursor_BASE;
|
||||
public static uint ThreeDaysGiftUIClose = ++Cursor_BASE;
|
||||
public static uint three_days_gift = ++Cursor_BASE;
|
||||
|
||||
}
|
||||
public static uint RefreshItemCount = ++Cursor_BASE;
|
||||
|
||||
public static readonly uint H5ViewClickBtn = ++Cursor_BASE;
|
||||
|
||||
|
||||
public static uint BattleLevelUp = ++Cursor_BASE;//通行证等级提升
|
||||
public static uint PayBattlePass = ++Cursor_BASE;//购买通行证
|
||||
public static uint AdWatchCountUpdated = ++Cursor_BASE;//看广告次数变化
|
||||
public static uint AdRewardClaimed = ++Cursor_BASE;//广告奖励已领取
|
||||
public static uint BuyRemoveAdPack = ++Cursor_BASE;//购买免广告礼包
|
||||
public static uint BuyPack = ++Cursor_BASE;//购买普通礼包
|
||||
public static uint resurgence = ++Cursor_BASE;
|
||||
public static uint resurgence_close = ++Cursor_BASE;
|
||||
public static uint RefreshSaveingPot = ++Cursor_BASE;
|
||||
public static uint hideBroadCast = ++Cursor_BASE;
|
||||
public static uint showBroadCast = ++Cursor_BASE;
|
||||
public static uint updateRecordList = ++Cursor_BASE;
|
||||
public static uint rewardMul_close = ++Cursor_BASE;
|
||||
public static uint ThreeDaysGiftUIClose = ++Cursor_BASE;
|
||||
public static uint three_days_gift = ++Cursor_BASE;
|
||||
public static uint use_prop = ++Cursor_BASE;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -134,7 +134,7 @@ namespace ScrewsMaster
|
||||
_payBoxPrice = (int)ConfigSystem.GetConfig<CommonModel>().addspace;
|
||||
if (type != 3)
|
||||
{
|
||||
_payBoxPrice = ConfigSystem.GetConfig<CommonModel>().Purchaseprops;
|
||||
_payBoxPrice = 1;
|
||||
|
||||
}
|
||||
|
||||
@@ -195,38 +195,38 @@ namespace ScrewsMaster
|
||||
{
|
||||
if (type != 3)
|
||||
{
|
||||
if (_needWatchAds)
|
||||
// if (_needWatchAds)
|
||||
// {
|
||||
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.BuyProp + "_" + type, 1);
|
||||
GameHelper.ShowVideoAd($"Prop", success =>
|
||||
{
|
||||
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.BuyProp + "_" + type, 1);
|
||||
GameHelper.ShowVideoAd($"Prop", success =>
|
||||
if (success)
|
||||
{
|
||||
if (success)
|
||||
{
|
||||
GameHelper.UpdateAdRewardExchangeTime();
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.use_prop, type);
|
||||
// GameHelper.AddAdWatchCount(-_payBoxPrice);
|
||||
SetButtonsTouchable(false);
|
||||
CtrlCloseUI();
|
||||
ShowScrews.Instance.ShowToast("Successfully used the props");
|
||||
}
|
||||
});
|
||||
return;
|
||||
//}
|
||||
|
||||
if (GameHelper.CheckAdWatchCount(_payBoxPrice))
|
||||
{
|
||||
GameHelper.AddAdWatchCount(-_payBoxPrice);
|
||||
// if (GameHelper.CheckAdWatchCount(_payBoxPrice))
|
||||
// {
|
||||
// GameHelper.AddAdWatchCount(-_payBoxPrice);
|
||||
|
||||
// ShowScrews.Instance.OnSuccessPayBox1(num);
|
||||
// SetButtonsTouchable(false);
|
||||
// CtrlCloseUI();
|
||||
// ShowScrews.Instance.ShowToast("Successful purchase");
|
||||
if (type == 0) GameHelper.AddItemNumber(ItemEnum.AddHole, 1);
|
||||
else if (type == 1) GameHelper.AddItemNumber(ItemEnum.MergeBox, 1);
|
||||
else if (type == 2) GameHelper.AddItemNumber(ItemEnum.ClearHole, 1);
|
||||
SetButtonsTouchable(false);
|
||||
CtrlCloseUI();
|
||||
ShowScrews.Instance.ShowToast("Exchange successful");
|
||||
}
|
||||
else
|
||||
{
|
||||
GameHelper.ShowTips("Insufficient AdWatchCount");
|
||||
}
|
||||
// // ShowScrews.Instance.OnSuccessPayBox1(num);
|
||||
// // SetButtonsTouchable(false);
|
||||
// // CtrlCloseUI();
|
||||
// // ShowScrews.Instance.ShowToast("Successful purchase");
|
||||
// // GameHelper.AddItemNumber(ItemEnum.ClearHole, 1);
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// GameHelper.ShowTips("Insufficient AdWatchCount");
|
||||
// }
|
||||
}
|
||||
else if (type == 3)
|
||||
{
|
||||
@@ -301,23 +301,32 @@ namespace ScrewsMaster
|
||||
_needWatchAds = false;
|
||||
ui.btn_PayBox.touchable = true;
|
||||
ui.btn_PayBox.grayed = false;
|
||||
if (GameHelper.CheckAdWatchCount(_payBoxPrice))
|
||||
if (type == 3)
|
||||
{
|
||||
ui.btn_PayBox.text = "Claim";
|
||||
}
|
||||
else if (GameHelper.InAdRewardCooldown())
|
||||
{
|
||||
ui.btn_PayBox.text = CommonHelper.TimeFormat((int)GameHelper.GetAdRewardCooldownTime() - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
||||
ui.btn_PayBox.touchable = false;
|
||||
ui.btn_PayBox.grayed = true;
|
||||
if (GameHelper.CheckAdWatchCount(_payBoxPrice))
|
||||
{
|
||||
ui.btn_PayBox.text = "Claim";
|
||||
}
|
||||
else if (GameHelper.InAdRewardCooldown())
|
||||
{
|
||||
ui.btn_PayBox.text = CommonHelper.TimeFormat((int)GameHelper.GetAdRewardCooldownTime() - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
||||
ui.btn_PayBox.touchable = false;
|
||||
ui.btn_PayBox.grayed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) (ui.btn_PayBox.GetChild("img_saveingpot") as GImage).visible = true;
|
||||
|
||||
_needWatchAds = true;
|
||||
ui.btn_PayBox.text = $"Watch Ad";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) (ui.btn_PayBox.GetChild("img_saveingpot") as GImage).visible = true;
|
||||
|
||||
_needWatchAds = true;
|
||||
ui.btn_PayBox.text = $"Watch Ad";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void SetButtonsTouchable(bool b)
|
||||
|
||||
@@ -263,10 +263,22 @@ PrefabInstance:
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2256419499509677768, guid: 96d1bffd106d2c447b20e183018429ad, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4104430348509620793, guid: 96d1bffd106d2c447b20e183018429ad, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4918018645639592118, guid: 96d1bffd106d2c447b20e183018429ad, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5414610925643004187, guid: 96d1bffd106d2c447b20e183018429ad, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7817730197064795707, guid: 96d1bffd106d2c447b20e183018429ad, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: GameStage
|
||||
|
||||
Reference in New Issue
Block a user