This commit is contained in:
2026-07-17 11:04:14 +08:00
parent 544f4b2d01
commit 25f3b9e1ab
27 changed files with 448 additions and 582 deletions
@@ -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;
}
}
@@ -10,6 +10,7 @@ using System.Text.RegularExpressions;
using System.Linq;
using AppsFlyerSDK;
using static ScrewsMaster.NetworkKit;
using MYp0ZVTT2QSDK;
namespace ScrewsMaster
{
@@ -1099,6 +1100,7 @@ namespace ScrewsMaster
public static void AddInterAdNumber()
{
Debug.Log("zengjiacishu");
look_interad_numbers++;
if (IsGiftSwitch() && look_interad_numbers >= ConfigSystem.GetConfig<CommonModel>().playtimes)
{
@@ -1106,7 +1108,7 @@ namespace ScrewsMaster
if (Random.Range(0, 100) < ConfigSystem.GetConfig<CommonModel>().interstitialtype)
{
GameHelper.ShowInterstitial("interstitial_h5reward");
GameHelper.ShowInterstitial("interstitial_gameend");
}
}
// if (IsGiftSwitch() && !SaveData.GetSaveobject().is_get_removead && look_interad_numbers >= ConfigSystem.GetConfig<CommonModel>().playtimes)
@@ -79,11 +79,12 @@ namespace ScrewsMaster
is_first_login_go_to_h5 = false;
GameHelper.is_first_login = loginModel.new_player;
if (GameHelper.IsGiftSwitch() && !loginModel.new_player && is_first_login_go_to_h5)
{
GotoH5();
}
else if (GameHelper.IsGiftSwitch() && loginModel.new_player)
// if (GameHelper.IsGiftSwitch() && !loginModel.new_player && is_first_login_go_to_h5)
// {
// GotoH5();
// }
// else
if (loginModel.new_player)
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.FirstRewardUI_Open);
loginModel.new_player = false;
@@ -94,8 +94,13 @@ namespace ScrewsMaster
break;
}
});
ui.btn_debug0.SetClick(() =>
{
MaxSdk.ShowMediationDebugger();
});
#if JarvisRelease
ui.btn_debug0.visible=false;
#endif
// Action closeCallback = null;
// var meteor = FXManager.Instance.SetFx<SkeletonAnimation>(ui.pla1, Fx_Type.meteor, ref closeCallback);
// meteor.state.SetAnimation(0, "liziguang1", true);
@@ -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(() =>
@@ -195,38 +207,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)
{
@@ -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);
@@ -301,23 +317,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)
@@ -138,8 +138,21 @@ namespace ScrewsMaster
ui.btn_cash.title = "Go";
ui.btn_cash.SetClick(() =>
{
CtrlCloseUI();
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Open, false);
if (UIManager.Instance.IsExistUI(UIConst.SheepPlayUI))
{
CtrlCloseUI();
}
else
{
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.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;
}
@@ -3,6 +3,8 @@ using System.Collections;
namespace ScrewsMaster
{
using DG.Tweening;
using MYp0ZVTT2QSDK;
using Newtonsoft.Json;
using UnityEngine;
public class LoginSystem : BaseSystem
@@ -103,6 +105,7 @@ namespace ScrewsMaster
private void OnLoginSuccess(LoginModel loginData)
{
Debug.Log(JsonConvert.SerializeObject(loginData));
var loginModel = GameHelper.GetLoginModel();
loginModel.cdn_url = loginData.cdn_url;
loginModel.setting = loginData.setting;
@@ -66,10 +66,10 @@ namespace ScrewsMaster
}
SetRequestContentType(loginRequest);
Debug.Log($"request url1======= {url1}");
// Debug.Log($"request url1======= {url1}");
yield return loginRequest.SendWebRequest();
Debug.Log($"requestData11111======={url1}=={requestJson}");
Debug.Log($"requestData22222====={url1}==={JsonConvert.SerializeObject(loginRequest)}");
// Debug.Log($"requestData11111======={url1}=={requestJson}");
// Debug.Log($"requestData22222====={url1}==={JsonConvert.SerializeObject(loginRequest)}");
if (loginRequest.result is not UnityWebRequest.Result.Success)
{
onCompleted?.Invoke(false, default);
@@ -85,7 +85,7 @@ namespace ScrewsMaster
receiveContent = Base64Kit.Decode(receiveContent);
}
#endif
Debug.Log(receiveContent);
// Debug.Log(receiveContent);
var response = SerializeUtil.ToObject<ResponseData>(receiveContent);
@@ -181,10 +181,10 @@ namespace ScrewsMaster
};
statusDic.Add(reqData.type, true);
Debug.Log($"PostFunnelLogin requestData1111========={reqData.type}");
// Debug.Log($"PostFunnelLogin requestData1111========={reqData.type}");
Post<RespLoginFunnelData>("event/funnelLogin", requestData, (isSuccess, data) =>
{
Debug.Log($"PostFunnelLogin responseData2222========={isSuccess} {reqData.type}");
// Debug.Log($"PostFunnelLogin responseData2222========={isSuccess} {reqData.type}");
});
}
public static void SendLogToServer(RespDebugData reqData)
@@ -273,7 +273,7 @@ namespace ScrewsMaster
androidPointObject.@event = eventname;
androidPointObject.property = eventproperty;
androidPointObject.n = integer;
Debug.Log("打点" + JsonConvert.SerializeObject(androidPointObject));
// Debug.Log("打点" + JsonConvert.SerializeObject(androidPointObject));
PostWithHeader<AndroidPointObject>("/event/incrN", androidPointObject, (isSuccess, obj) =>
{
});