fix:1、删除部分不用的资源代码。2、a面修复bug

This commit is contained in:
barry
2026-04-28 18:42:00 +08:00
parent 70d45d4705
commit cc12dffbaa
417 changed files with 36736 additions and 40575 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
using System.Collections.Generic;
using SGModule.ApplePay;
// using SGModule.ApplePay;
using SGModule.ConfigLoader;
namespace RedHotRoast
{
@@ -9,6 +9,7 @@ namespace RedHotRoast
#region Field
public static bool IsEnabledEngineLog = ConfigManager.GameConfig.enabledLog;
// public static bool IsEnabledEngineLog = true;
public const LogType EnabledFilterLogType =
LogType.Log | LogType.Warning | LogType.Error | LogType.Assert |
+2 -2
View File
@@ -33,8 +33,8 @@ public class LoveLegendRoot : MonoBehaviour
MarkdownKit.Instance.LoadText("privacy", "https://www.dreamlovelegend.com/privacy.md");
MarkdownKit.Instance.LoadText("user", "https://www.dreamlovelegend.com/user.md");
// MarkdownKit.Instance.LoadText("privacy", "https://www.dreamlovelegend.com/privacy.md");
// MarkdownKit.Instance.LoadText("user", "https://www.dreamlovelegend.com/user.md");
}
private static string adInfoLabel = "";
+1 -1
View File
@@ -5,7 +5,7 @@ using System.Diagnostics;
using System.IO;
using DG.Tweening;
using IgnoreOPS;
using SGModule.ApplePay;
// using SGModule.ApplePay;
using SGModule.NetKit;
+10 -10
View File
@@ -7,7 +7,7 @@ using UnityEngine.UI;
using System.Linq;
using System;
using IgnoreOPS;
using SGModule.ApplePay;
// using SGModule.ApplePay;
using SGModule.Common.Helper;
using SGModule.NetKit;
using RedHotRoast;
@@ -97,15 +97,15 @@ public class MaxPayManager
// Debug.Log("barry ios pay");
// 调用官方支付逻辑
isIOSPay = true;
var appleData = new ApplePayData
{
sku = _data.sku,
amount = _data.amount,
currency = _data.currency,
shopName = _data.shopName,
type = _data.type
};
PurchasingManager.Purchase(appleData);
// var appleData = new ApplePayData
// {
// sku = _data.sku,
// amount = _data.amount,
// currency = _data.currency,
// shopName = _data.shopName,
// type = _data.type
// };
// PurchasingManager.Purchase(appleData);
}
else
{
+18 -18
View File
@@ -12,7 +12,7 @@ using SGModule.Common.Extensions;
using SGModule.Common.Helper;
using FGUI.ZM_Lobby_03;
using System.Net;
using SGModule.ApplePay;
// using SGModule.ApplePay;
using SGModule.Net;
using System.IO;
using System.Linq;
@@ -406,7 +406,7 @@ namespace RedHotRoast
}
}
}
checkThreeGift();
// checkThreeGift();
var head = ui.btn_head as btn_head;
if (head != null)
{
@@ -594,22 +594,22 @@ namespace RedHotRoast
ui.btn_task.SetClick(() => { OnClickTask(false); });
ui.btn_restore.SetClick(() =>
{
ApplePayManager.Instance.AppleRestore((success, message) =>
{
Debug.Log($"[barry] restore success message: {message}---- {JsonConvert.SerializeObject(message)}");
if (success)
{
Debug.Log("[barry] restore success: " + success);
GameHelper.ShowTips("Restore_pur", true);
SaveData.GetSaveObject().have_slot = success;
DataMgr.VipLevel.Value = 3;
DataMgr.VipExpirationTime.Value = ServerClock.GetCurrentServerTime() + 7 * 24 * 60 * 60;
}
else
{
GameHelper.ShowTips("recoverable_tips", true);
}
});
// ApplePayManager.Instance.AppleRestore((success, message) =>
// {
// Debug.Log($"[barry] restore success message: {message}---- {JsonConvert.SerializeObject(message)}");
// if (success)
// {
// Debug.Log("[barry] restore success: " + success);
// GameHelper.ShowTips("Restore_pur", true);
// SaveData.GetSaveObject().have_slot = success;
// DataMgr.VipLevel.Value = 3;
// DataMgr.VipExpirationTime.Value = ServerClock.GetCurrentServerTime() + 7 * 24 * 60 * 60;
// }
// else
// {
// GameHelper.ShowTips("recoverable_tips", true);
// }
// });
});
Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig<ApplePay>()));
+19 -19
View File
@@ -1,6 +1,6 @@
using FGUI.ZM_Common_01;
using FGUI.ZM_Setting_07;
using SGModule.ApplePay;
// using SGModule.ApplePay;
using SGModule.Common.Extensions;
using SGModule.Net;
@@ -65,7 +65,7 @@ namespace RedHotRoast
ui.com_gold.y += Screen.safeArea.y;
}
ui.gift_switch.selectedIndex = GameHelper.IsGiftSwitch() ? 1 : 0;
ui.gift_switch.selectedIndex = 1;
total_item = 8;
selectIndex = DataMgr.PlayerAvatarId.Value;
@@ -138,26 +138,26 @@ namespace RedHotRoast
// ui.btn_credits.menus.selectedIndex = btn_menu.Menus_credits;
ui.btn_privacy.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 0); });
ui.btn_terms.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 1); });
ui.btn_official.SetClick(() => { OpenBrowser.OpenURL("https://www.frozenarena.top/"); });
ui.btn_official.SetClick(() => { OpenBrowser.OpenURL("https://reddhotcompangost.com/"); });
ui.btn_us.SetClick(() => { GameHelper.OpenEmail(); });
// ui.btn_credits.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 2); });
ui.btn_restore.SetClick(() =>
{
ApplePayManager.Instance.AppleRestore((success, message) =>
{
if (success)
{
Debug.Log("[barry] restore success: " + success);
GameHelper.ShowTips("Restore_pur", true);
SaveData.GetSaveObject().have_slot = success;
DataMgr.VipLevel.Value = 3;
DataMgr.VipExpirationTime.Value = ServerClock.GetCurrentServerTime() + 7 * 24 * 60 * 60;
}
else
{
GameHelper.ShowTips("recoverable_tips", true);
}
});
// ApplePayManager.Instance.AppleRestore((success, message) =>
// {
// if (success)
// {
// Debug.Log("[barry] restore success: " + success);
// GameHelper.ShowTips("Restore_pur", true);
// SaveData.GetSaveObject().have_slot = success;
// DataMgr.VipLevel.Value = 3;
// DataMgr.VipExpirationTime.Value = ServerClock.GetCurrentServerTime() + 7 * 24 * 60 * 60;
// }
// else
// {
// GameHelper.ShowTips("recoverable_tips", true);
// }
// });
});
ui.btn_language.SetClick(() => {
@@ -177,7 +177,7 @@ namespace RedHotRoast
if (!SaveData.GetSaveObject().is_get_removead && random_ < GameHelper.GetCommonModel().HomeInterstitialAd)
{
//GameHelper.ShowInterstitial("BackHall");
uiCtrlDispatcher.Dispatch(UICtrlMsg.AdcomingUI_Open);
// uiCtrlDispatcher.Dispatch(UICtrlMsg.AdcomingUI_Open);
}
}
@@ -1,6 +1,7 @@
using System;
using FairyGUI;
using Spine.Unity;
using UnityEngine;
namespace RedHotRoast
@@ -61,6 +62,10 @@ namespace RedHotRoast
protected override void OnOpenBefore(object args)
{
if (Screen.safeArea.y != 0)
{
ui.img_icon.y += Screen.safeArea.y;
}
var sk = FXManager.Instance.SetFx<SkeletonAnimation>(ui.bg_parent, Fx_Type.fx_login, ref closeCallback);
sk.state.SetAnimation(0, "animation", true);
}
@@ -105,7 +105,7 @@ namespace RedHotRoast
ui.text_level.text = stage;
DOVirtual.DelayedCall(0.7f, () =>
DOVirtual.DelayedCall(1.5f, () =>
{
// ui.tips_node1.visible = true;
// var open_bg = FXManager.Instance.SetFx<SkeletonAnimation>(ui.tips_node1, Fx_Type.fx_open_bg, ref closeCallback);
+1 -1
View File
@@ -263,7 +263,7 @@ namespace RedHotRoast
if (!SaveData.GetSaveObject().is_get_removead && random_ < GameHelper.GetCommonModel().HomeInterstitialAd)
{
//GameHelper.ShowInterstitial("BackHall");
uiCtrlDispatcher.Dispatch(UICtrlMsg.AdcomingUI_Open);
// uiCtrlDispatcher.Dispatch(UICtrlMsg.AdcomingUI_Open);
}
}
+30 -30
View File
@@ -77,37 +77,37 @@ namespace RedHotRoast
ui.title.text = isTerm == 2 ? "View Credits" : title;
var color = new Color(172 / 255f, 131 / 255f, 113 / 255f, 1f);
MarkdownKit.Instance.ShowAsRichText(ui.text_list, BisTerm ? "user" : "privacy", color, (success, state) => {
if (success) {
Debug.Log("内容加载成功!当前状态:" + state);
}
else {
Debug.LogError("内容加载失败!当前状态:" + state);
}
}, 44);
// LoadKit.Instance.LoadAsset<TextAsset>("TextAsset", BisTerm ? "Term" : "Privacy", (txt) =>
// {
// content = txt.text;
//
// var str = getstr(content, 16327);
//
// foreach (var t in str)
// {
// var aRichTextField = new GRichTextField();
// aRichTextField.SetSize(GRoot.inst.width, 100);
// aRichTextField.color = new Color(0.64f, 0.36f, 0.12f, 1f);
// // aRichTextField.strokeColor = Color.black;
// // aRichTextField.stroke = 1;
// aRichTextField.textFormat.size = 44;
// aRichTextField.autoSize = AutoSizeType.Height;
// aRichTextField.AddRelation(GRoot.inst, RelationType.Width);
// aRichTextField.text = t;
// ui.text_list.AddChild(aRichTextField);
// MarkdownKit.Instance.ShowAsRichText(ui.text_list, BisTerm ? "user" : "privacy", color, (success, state) => {
// if (success) {
// Debug.Log("内容加载成功!当前状态:" + state);
// }
//
// ui.text_list.EnsureBoundsCorrect();
// });
// else {
// Debug.LogError("内容加载失败!当前状态:" + state);
// }
// }, 44);
LoadKit.Instance.LoadAsset<TextAsset>("TextAsset", BisTerm ? "Term" : "Privacy", (txt) =>
{
content = txt.text;
var str = getstr(content, 16327);
foreach (var t in str)
{
var aRichTextField = new GRichTextField();
aRichTextField.SetSize(GRoot.inst.width, 100);
aRichTextField.color = new Color(172 / 255f, 131 / 255f, 113 / 255f, 1f);
// aRichTextField.strokeColor = Color.black;
// aRichTextField.stroke = 1;
aRichTextField.textFormat.size = 42;
aRichTextField.autoSize = AutoSizeType.Height;
aRichTextField.AddRelation(GRoot.inst, RelationType.Width);
aRichTextField.text = t;
ui.text_list.AddChild(aRichTextField);
}
ui.text_list.EnsureBoundsCorrect();
});
ui.btn_close.SetClick(CtrlCloseUI);
}
@@ -151,7 +151,7 @@ namespace RedHotRoast
isToday = GameHelper.InToday(DataMgr.SignState.Value[signDays - 1], 0, true);
// ui.btn_collect.state.selectedIndex = index == signDays && !(signDays > 0 && isToday)? 0 : 1;
ui.btn_collect.state.selectedIndex = 1;
if (index < signDays)
{
@@ -159,6 +159,7 @@ namespace RedHotRoast
}
else if (index == signDays)
{
ui.btn_collect.state.selectedIndex = 1;
if (signDays > 0 && isToday)
{
@@ -168,6 +169,7 @@ namespace RedHotRoast
{
btnSign.state.selectedIndex = 1;
ui.btn_collect.state.selectedIndex = 0;
btnSign.isCloseClickAnim = true;
// btnSign.status.selectedIndex = btn_sign.State_today;
@@ -7,7 +7,7 @@ using SGModule.Common.Helper;
using SGModule.NetKit;
using SGModule.MarkdownKit;
using Newtonsoft.Json;
using SGModule.ApplePay;
// using SGModule.ApplePay;
using SGModule.Net;
using System.Linq;
using SGModule.Common.Extensions;
@@ -221,24 +221,24 @@ namespace RedHotRoast
ui.btn_restore.visible = !GameHelper.IsGiftSwitch();
ui.btn_restore.SetClick(() =>
{
ApplePayManager.Instance.AppleRestore((success, message) =>
{
Debug.Log($"[barry] restore success message: {message}---- {JsonConvert.SerializeObject(message)}");
if (success)
{
Debug.Log("[barry] restore success: " + success);
GameHelper.ShowTips("Restore_pur", true);
SaveData.GetSaveObject().have_slot = success;
DataMgr.VipLevel.Value = 3;
DataMgr.VipExpirationTime.Value = ServerClock.GetCurrentServerTime() + 7 * 24 * 60 * 60;
InitView();
}
else
{
GameHelper.ShowTips("recoverable_tips", true);
}
});
// ApplePayManager.Instance.AppleRestore((success, message) =>
// {
// Debug.Log($"[barry] restore success message: {message}---- {JsonConvert.SerializeObject(message)}");
// if (success)
// {
// Debug.Log("[barry] restore success: " + success);
// GameHelper.ShowTips("Restore_pur", true);
// SaveData.GetSaveObject().have_slot = success;
// DataMgr.VipLevel.Value = 3;
// DataMgr.VipExpirationTime.Value = ServerClock.GetCurrentServerTime() + 7 * 24 * 60 * 60;
//
// InitView();
// }
// else
// {
// GameHelper.ShowTips("recoverable_tips", true);
// }
// });
});
SetSubBtnState(_level, (int)VipDay.Year);
+87 -69
View File
@@ -1,10 +1,10 @@
using System;
using System.Collections.Generic;
using SGModule.ApplePay;
// using SGModule.ApplePay;
using SGModule.NetKit;
using UnityEngine;
using RedHotRoast;
using UnityEngine.Purchasing;
// using UnityEngine.Purchasing;
using Newtonsoft.Json;
public enum PayType
@@ -78,75 +78,75 @@ public class PurchasingManager
Debug.Log($"[Apple Pay] unity Purchase--0-----: {payData.sku}");
ApplePayManager.Instance.Purchase(payData.sku, ApplePaySuccessCallback(payData), message =>
{
Debug.Log("purchase fail------- reason: " + message);
});
// ApplePayManager.Instance.Purchase(payData.sku, ApplePaySuccessCallback(payData), message =>
// {
// Debug.Log("purchase fail------- reason: " + message);
// });
}
public static Action<ApplePayBackType, AppleResponseData> ApplePaySuccessCallback(ApplePayData payData)
{
return (backType, AppleResponseData) =>
{
Debug.Log($"[Apple Pay] unity Purchase--1-----: {backType.ToString()}");
switch (backType)
{
case ApplePayBackType.Create:
Debug.Log("[Apple Pay] Create");
var sku0 = SetSku(payData);
Debug.Log($"[Apple Pay] Create---11: {sku0}");
SendEventClickByName(sku0, "click");
break;
case ApplePayBackType.Check:
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Close);
if (AppleResponseData != null && AppleResponseData.sku.Contains("sub"))
{
DataMgr.VipExpirationTime.Value = Math.Max(DataMgr.VipExpirationTime.Value, AppleResponseData.expires_time);
var level = GetVipLvFormConfig(AppleResponseData.sku);
DataMgr.VipLevel.Value = level;
payData.sku = AppleResponseData.sku;
payData.shopName = "vip_club" + (level - 1);
}
var sku = SetSku(payData);
Debug.Log($"[Apple Pay] Check sku===2===== {sku}");
GameDispatcher.Instance.Dispatch(GameMsg.apple_pay_success, sku);
Debug.Log($"[Apple Pay] Check sku===3===== {sku}");
SendEventClickByName(sku, "open");
SendEventClickByName(sku, "success");
break;
case ApplePayBackType.Cancel:
Debug.Log("[Apple Pay] Cancel");
var sku1 = SetSku(payData);
SendEventClickByName(sku1, "open");
BIManager.Instance.TrackPurchase(payData.amount, payData.currency, "0", payData.sku, "paid_err");
break;
}
};
}
private static void TestIOSPay(ApplePayData payData)
{
var tranId = "";
var types = ProductType.Consumable;
if (GetPaySku(PayType.battle_pass) == payData.sku)
{
tranId = "2000000983625783";
}
else if (GetPaySku(PayType.weekly_subscription) == payData.sku)
{
tranId = "2000000984643029";
types = ProductType.Subscription;
}
if (tranId == "") return;
ApplePayManager.Instance.ApplePayTest(types, payData.sku, tranId, ApplePaySuccessCallback(payData));
}
// public static Action<ApplePayBackType, AppleResponseData> ApplePaySuccessCallback(ApplePayData payData)
// {
// return (backType, AppleResponseData) =>
// {
// Debug.Log($"[Apple Pay] unity Purchase--1-----: {backType.ToString()}");
// switch (backType)
// {
// case ApplePayBackType.Create:
// Debug.Log("[Apple Pay] Create");
// var sku0 = SetSku(payData);
// Debug.Log($"[Apple Pay] Create---11: {sku0}");
// SendEventClickByName(sku0, "click");
// break;
// case ApplePayBackType.Check:
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Close);
//
// if (AppleResponseData != null && AppleResponseData.sku.Contains("sub"))
// {
// DataMgr.VipExpirationTime.Value = Math.Max(DataMgr.VipExpirationTime.Value, AppleResponseData.expires_time);
// var level = GetVipLvFormConfig(AppleResponseData.sku);
// DataMgr.VipLevel.Value = level;
// payData.sku = AppleResponseData.sku;
// payData.shopName = "vip_club" + (level - 1);
// }
//
// var sku = SetSku(payData);
//
// Debug.Log($"[Apple Pay] Check sku===2===== {sku}");
// GameDispatcher.Instance.Dispatch(GameMsg.apple_pay_success, sku);
// Debug.Log($"[Apple Pay] Check sku===3===== {sku}");
//
// SendEventClickByName(sku, "open");
//
// SendEventClickByName(sku, "success");
// break;
// case ApplePayBackType.Cancel:
// Debug.Log("[Apple Pay] Cancel");
// var sku1 = SetSku(payData);
// SendEventClickByName(sku1, "open");
// BIManager.Instance.TrackPurchase(payData.amount, payData.currency, "0", payData.sku, "paid_err");
// break;
// }
// };
// }
//
// private static void TestIOSPay(ApplePayData payData)
// {
// var tranId = "";
// var typespes = ProductType.Consumable;
// if (GetPaySku(PayType.battle_pass) == payData.sku)
// {
// tranId = "2000000983625783";
// }
// else if (GetPaySku(PayType.weekly_subscription) == payData.sku)
// {
// tranId = "2000000984643029";
// types = ProductType.Subscription;
// }
//
// if (tranId == "") return;
//
// ApplePayManager.Instance.ApplePayTest(types, payData.sku, tranId, ApplePaySuccessCallback(payData));
// }
private static string SetSku(ApplePayData data)
{
@@ -262,6 +262,24 @@ public class PurchasingManager
}
public class ApplePayData
{
[JsonProperty("innerOrderId")]
public string innerOrderId;
[JsonProperty("amount")]
public int amount;
[JsonProperty("sku")]
public string sku;
[JsonProperty("currency")]
public string currency = "USD";
[JsonProperty("shopName")]
public string shopName;
[JsonProperty("type")]
public string type;
}
public class SubscriptionList
{
[JsonProperty("renew_time")]
@@ -24,8 +24,8 @@ namespace RedHotRoast
private static void RegisterFont()
{
UIManager uiManager = UIManager.Instance;
uiManager.RegisterDefaultFont("BOONTOOK-ULTRA");
uiManager.RegisterFont("BOONTOOK-ULTRA");
uiManager.RegisterDefaultFont("BalooBhaina-Regular");
uiManager.RegisterFont("BalooBhaina-Regular");
}
}
}
@@ -2,6 +2,7 @@ using System;
using IgnoreOPS;
using SGModule.Common.Extensions;
using SGModule.NetKit;
using UnityEngine;
namespace RedHotRoast
{
@@ -53,6 +54,7 @@ namespace RedHotRoast
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.NetworkErrorTipsUI_Open);
LoginKit.Instance.LoginRequest(SuperApplication.Instance.attribution, NetworkManager.haveSimCard, (isSuccess, loginData) =>
{
Debug.Log($"登陆结果: {isSuccess}");
TrackKit.TrackLoginFunnel(LoginFunnelEventType.LoginRecv, isSuccess ? "success" : "fail");
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.NetworkErrorTipsUI_Close);
+3 -3
View File
@@ -19,12 +19,12 @@ namespace RedHotRoast
public class MaxADKit
{
public static string SDKKey =
"oXM0CzVDi7P1HstOpKvFMInPMOzpQ9uA6t3x75q5f5wQvsEy9vuiiiM94ZJCJSV7PcZGroSSInQCTGsu04QEiE";
"LHx_tPFslZpTTiIPABmS24T7Ev1QEVOUVOzirpkxLUuTwJTVZGCKAk9L3Tm3FwuM5LxHK3q1EIbAemJB5sNpX2";
public static string interstitialADUnitID = "e3b89b902a31fb28";
public static string interstitialADUnitID = "8971dfc98065c2c0";
public static string rewardedADUnitID = "a19836405c24924d";
public static string rewardedADUnitID = "13c3601021e6a8b9";
private const float RevenueThreshold = 0;