This commit is contained in:
2026-07-15 16:45:12 +08:00
parent 68f86e3f05
commit 4d3e709b6b
8 changed files with 141 additions and 118 deletions
-15
View File
@@ -1,15 +0,0 @@
<linker>
<assembly fullname="Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
<type fullname="UnityEngine.AddressableAssets.Addressables" preserve="all" />
</assembly>
<assembly fullname="Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.SceneProvider" preserve="all" />
</assembly>
<assembly fullname="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.TextAsset" preserve="all" />
</assembly>
</linker>
@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 72ab2c30ef1ed4d489ce1dfff8f86119
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,65 +1,67 @@
namespace ScrewsMaster namespace ScrewsMaster
{ {
public static partial class GameMsg public static partial class GameMsg
{ {
public static readonly uint OpenGame = ++Cursor_BASE; public static readonly uint OpenGame = ++Cursor_BASE;
public static readonly uint Update111Completed = ++Cursor_BASE; public static readonly uint Update111Completed = ++Cursor_BASE;
public static readonly uint BackMainScene = ++Cursor_BASE; public static readonly uint BackMainScene = ++Cursor_BASE;
public static readonly uint Update102Completed = ++Cursor_BASE; public static readonly uint Update102Completed = ++Cursor_BASE;
public static uint Slot_refresh = ++Cursor_BASE; public static uint Slot_refresh = ++Cursor_BASE;
public static uint Remake_state = ++Cursor_BASE; public static uint Remake_state = ++Cursor_BASE;
public static readonly uint MakeupSuccess = ++Cursor_BASE; public static readonly uint MakeupSuccess = ++Cursor_BASE;
public static uint Ad_success = ++Cursor_BASE; public static uint Ad_success = ++Cursor_BASE;
public static uint UpdateHotFixMax = ++Cursor_BASE; public static uint UpdateHotFixMax = ++Cursor_BASE;
public static uint UpdateHotFixProgress = ++Cursor_BASE; public static uint UpdateHotFixProgress = ++Cursor_BASE;
public static readonly uint RefreshTodoUI = ++Cursor_BASE; public static readonly uint RefreshTodoUI = ++Cursor_BASE;
public static readonly uint RefreshMakeupData = ++Cursor_BASE; public static readonly uint RefreshMakeupData = ++Cursor_BASE;
public static uint Gold_refresh = ++Cursor_BASE; public static uint Gold_refresh = ++Cursor_BASE;
public static uint Sheep_item_refresh = ++Cursor_BASE; public static uint Sheep_item_refresh = ++Cursor_BASE;
public static uint card_click = ++Cursor_BASE; public static uint card_click = ++Cursor_BASE;
public static uint RefreshADTask = ++Cursor_BASE; public static uint RefreshADTask = ++Cursor_BASE;
public static readonly uint GetReward = ++Cursor_BASE; public static readonly uint GetReward = ++Cursor_BASE;
public static readonly uint ProcessReward = ++Cursor_BASE; public static readonly uint ProcessReward = ++Cursor_BASE;
public static readonly uint Update101 = ++Cursor_BASE; public static readonly uint Update101 = ++Cursor_BASE;
public static readonly uint MakeUpConfirmUIClosed = ++Cursor_BASE; public static readonly uint MakeUpConfirmUIClosed = ++Cursor_BASE;
public static readonly uint Update111 = ++Cursor_BASE; public static readonly uint Update111 = ++Cursor_BASE;
public static uint reset_game = ++Cursor_BASE; public static uint reset_game = ++Cursor_BASE;
public static uint GetTaskReward = ++Cursor_BASE; public static uint GetTaskReward = ++Cursor_BASE;
public static uint google_pay_success = ++Cursor_BASE; public static uint google_pay_success = ++Cursor_BASE;
public static uint apple_pay_success = ++Cursor_BASE; public static uint apple_pay_success = ++Cursor_BASE;
public static uint pack_close = ++Cursor_BASE; public static uint pack_close = ++Cursor_BASE;
public static uint PaySuccess = ++Cursor_BASE; public static uint PaySuccess = ++Cursor_BASE;
public static uint resetH5progress = ++Cursor_BASE; public static uint resetH5progress = ++Cursor_BASE;
public static uint GotoH5 = ++Cursor_BASE; public static uint GotoH5 = ++Cursor_BASE;
public static uint RefreshGame = ++Cursor_BASE; public static uint RefreshGame = ++Cursor_BASE;
public static uint FlyGold = ++Cursor_BASE; public static uint FlyGold = ++Cursor_BASE;
public static uint RefreshLookAd = ++Cursor_BASE; public static uint RefreshLookAd = ++Cursor_BASE;
public static uint RefreshItemCount = ++Cursor_BASE;
public static readonly uint H5ViewClickBtn = ++Cursor_BASE;
public static uint BattleLevelUp = ++Cursor_BASE;//通行证等级提升 public static uint RefreshItemCount = ++Cursor_BASE;
public static uint PayBattlePass = ++Cursor_BASE;//购买通行证
public static uint AdWatchCountUpdated = ++Cursor_BASE;//看广告次数变化 public static readonly uint H5ViewClickBtn = ++Cursor_BASE;
public static uint AdRewardClaimed = ++Cursor_BASE;//广告奖励已领取
public static uint BuyRemoveAdPack = ++Cursor_BASE;//购买免广告礼包
public static uint BuyPack = ++Cursor_BASE;//购买普通礼包 public static uint BattleLevelUp = ++Cursor_BASE;//通行证等级提升
public static uint resurgence = ++Cursor_BASE; public static uint PayBattlePass = ++Cursor_BASE;//购买通行证
public static uint resurgence_close = ++Cursor_BASE; public static uint AdWatchCountUpdated = ++Cursor_BASE;//看广告次数变化
public static uint RefreshSaveingPot = ++Cursor_BASE; public static uint AdRewardClaimed = ++Cursor_BASE;//广告奖励已领取
public static uint hideBroadCast = ++Cursor_BASE; public static uint BuyRemoveAdPack = ++Cursor_BASE;//购买免广告礼包
public static uint showBroadCast = ++Cursor_BASE; public static uint BuyPack = ++Cursor_BASE;//购买普通礼包
public static uint updateRecordList = ++Cursor_BASE; public static uint resurgence = ++Cursor_BASE;
public static uint rewardMul_close = ++Cursor_BASE; public static uint resurgence_close = ++Cursor_BASE;
public static uint ThreeDaysGiftUIClose = ++Cursor_BASE; public static uint RefreshSaveingPot = ++Cursor_BASE;
public static uint three_days_gift = ++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; _payBoxPrice = (int)ConfigSystem.GetConfig<CommonModel>().addspace;
if (type != 3) if (type != 3)
{ {
_payBoxPrice = ConfigSystem.GetConfig<CommonModel>().Purchaseprops; _payBoxPrice = 1;
} }
@@ -195,38 +195,38 @@ namespace ScrewsMaster
{ {
if (type != 3) 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); if (success)
GameHelper.ShowVideoAd($"Prop", success =>
{ {
if (success) GameDispatcher.Instance.Dispatch(GameMsg.use_prop, type);
{ // GameHelper.AddAdWatchCount(-_payBoxPrice);
GameHelper.UpdateAdRewardExchangeTime(); SetButtonsTouchable(false);
} CtrlCloseUI();
}); ShowScrews.Instance.ShowToast("Successfully used the props");
return; }
} });
return;
//}
if (GameHelper.CheckAdWatchCount(_payBoxPrice)) // if (GameHelper.CheckAdWatchCount(_payBoxPrice))
{ // {
GameHelper.AddAdWatchCount(-_payBoxPrice); // GameHelper.AddAdWatchCount(-_payBoxPrice);
// ShowScrews.Instance.OnSuccessPayBox1(num); // // ShowScrews.Instance.OnSuccessPayBox1(num);
// SetButtonsTouchable(false); // // SetButtonsTouchable(false);
// CtrlCloseUI(); // // CtrlCloseUI();
// ShowScrews.Instance.ShowToast("Successful purchase"); // // ShowScrews.Instance.ShowToast("Successful purchase");
if (type == 0) GameHelper.AddItemNumber(ItemEnum.AddHole, 1); // // GameHelper.AddItemNumber(ItemEnum.ClearHole, 1);
else if (type == 1) GameHelper.AddItemNumber(ItemEnum.MergeBox, 1);
else if (type == 2) GameHelper.AddItemNumber(ItemEnum.ClearHole, 1); // }
SetButtonsTouchable(false); // else
CtrlCloseUI(); // {
ShowScrews.Instance.ShowToast("Exchange successful"); // GameHelper.ShowTips("Insufficient AdWatchCount");
} // }
else
{
GameHelper.ShowTips("Insufficient AdWatchCount");
}
} }
else if (type == 3) else if (type == 3)
{ {
@@ -301,23 +301,32 @@ namespace ScrewsMaster
_needWatchAds = false; _needWatchAds = false;
ui.btn_PayBox.touchable = true; ui.btn_PayBox.touchable = true;
ui.btn_PayBox.grayed = false; ui.btn_PayBox.grayed = false;
if (GameHelper.CheckAdWatchCount(_payBoxPrice)) if (type == 3)
{ {
ui.btn_PayBox.text = "Claim"; if (GameHelper.CheckAdWatchCount(_payBoxPrice))
} {
else if (GameHelper.InAdRewardCooldown()) ui.btn_PayBox.text = "Claim";
{ }
ui.btn_PayBox.text = CommonHelper.TimeFormat((int)GameHelper.GetAdRewardCooldownTime() - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour); else if (GameHelper.InAdRewardCooldown())
ui.btn_PayBox.touchable = false; {
ui.btn_PayBox.grayed = true; 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 else
{ {
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) (ui.btn_PayBox.GetChild("img_saveingpot") as GImage).visible = true;
_needWatchAds = true; _needWatchAds = true;
ui.btn_PayBox.text = $"Watch Ad"; ui.btn_PayBox.text = $"Watch Ad";
} }
} }
private void SetButtonsTouchable(bool b) private void SetButtonsTouchable(bool b)
+12
View File
@@ -263,10 +263,22 @@ PrefabInstance:
propertyPath: m_IsActive propertyPath: m_IsActive
value: 1 value: 1
objectReference: {fileID: 0} 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} - target: {fileID: 4918018645639592118, guid: 96d1bffd106d2c447b20e183018429ad, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 1 value: 1
objectReference: {fileID: 0} 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} - target: {fileID: 7817730197064795707, guid: 96d1bffd106d2c447b20e183018429ad, type: 3}
propertyPath: m_Name propertyPath: m_Name
value: GameStage value: GameStage
+1 -1
View File
@@ -13,7 +13,7 @@ public class ItemNumShow : MonoBehaviour
private void Awake() private void Awake()
{ {
GameDispatcher.Instance.AddListener(GameMsg.RefreshItemCount, RefreshItemCount); // GameDispatcher.Instance.AddListener(GameMsg.RefreshItemCount, RefreshItemCount);
} }
private void RefreshItemCount(object obj) private void RefreshItemCount(object obj)
{ {
+22
View File
@@ -126,6 +126,8 @@ public class ShowScrews : MonoBehaviour, ICanvasRaycastFilter
addHole.onClick.AddListener(OnAddHoleBtnClick); addHole.onClick.AddListener(OnAddHoleBtnClick);
mergeBox.onClick.AddListener(OnMergeBoxBtnClick); mergeBox.onClick.AddListener(OnMergeBoxBtnClick);
clearHole.onClick.AddListener(OnClearHoleBtnClick); clearHole.onClick.AddListener(OnClearHoleBtnClick);
GameDispatcher.Instance.AddListener(GameMsg.use_prop, UseProp);
errorBtn.gameObject.SetActive(false); errorBtn.gameObject.SetActive(false);
#if !JarvisRelease #if !JarvisRelease
@@ -1759,6 +1761,26 @@ public class ShowScrews : MonoBehaviour, ICanvasRaycastFilter
} }
} }
public void UseProp(object a)
{
int type = (int)a;
if (type == 0)
{
_requestStageData.item_costs[0]++;
AddHoleLogic();
}
else if (type == 1)
{
_requestStageData.item_costs[1]++;
MergeBoxLogic();
}
else if (type == 2)
{
_requestStageData.item_costs[2]++;
ClearHolesLogic(); //清除孔洞到看不见的缓冲区
}
}
private void AddHoleLogic() private void AddHoleLogic()
{ {
_kongLogics[_curUnlockingHoleCount].SetLockState(false); _kongLogics[_curUnlockingHoleCount].SetLockState(false);