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:
@@ -60,6 +60,8 @@ namespace ScrewsMaster
public static uint rewardMul_close = ++Cursor_BASE; public static uint rewardMul_close = ++Cursor_BASE;
public static uint ThreeDaysGiftUIClose = ++Cursor_BASE; public static uint ThreeDaysGiftUIClose = ++Cursor_BASE;
public static uint three_days_gift = ++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); NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.BuyProp + "_" + type, 1);
GameHelper.ShowVideoAd($"Prop", success => GameHelper.ShowVideoAd($"Prop", success =>
{ {
if (success) if (success)
{ {
GameHelper.UpdateAdRewardExchangeTime(); GameDispatcher.Instance.Dispatch(GameMsg.use_prop, type);
// GameHelper.AddAdWatchCount(-_payBoxPrice);
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,6 +301,8 @@ 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 (type == 3)
{
if (GameHelper.CheckAdWatchCount(_payBoxPrice)) if (GameHelper.CheckAdWatchCount(_payBoxPrice))
{ {
ui.btn_PayBox.text = "Claim"; ui.btn_PayBox.text = "Claim";
@@ -319,6 +321,13 @@ namespace ScrewsMaster
ui.btn_PayBox.text = $"Watch Ad"; ui.btn_PayBox.text = $"Watch Ad";
} }
} }
else
{
_needWatchAds = true;
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);