fix:1、添加H5

This commit is contained in:
barry
2026-05-25 09:45:16 +08:00
parent 8144a27fdb
commit 5f68fe42c1
276 changed files with 46771 additions and 27478 deletions
+31 -1
View File
@@ -1,12 +1,14 @@
// #if UNITY_EDITOR
// #endif
using System.Diagnostics;
using System.IO;
using DG.Tweening;
using DontConfuse;
using FairyGUI;
using IgnoreOPS;
// using SGModule.ApplePay;
using SGModule.NetKit;
using UnityEngine;
namespace RedHotRoast
@@ -104,6 +106,34 @@ namespace RedHotRoast
ShowScene();
SaveingPotHelper.CheckSaveingPot();
SaveingPotHelper.TestingClearTime();
if (GameHelper.IsGiftSwitch())
{
WebviewManager.Instance.SetFullScreen();
int flyswitch = ConfigSystem.GetCommonConf().flyswitch;
int propswitch = ConfigSystem.GetCommonConf().propswitch;
int offset_y = ConfigSystem.GetCommonConf().WVOffset[0];
int offset_y1 = ConfigSystem.GetCommonConf().WVOffset[1];
Debug.Log("barry offset_y: " + offset_y + " offset_y1: " + offset_y1);
float top_offset = 0;//fgui中的顶部信息的高度
float buttom_offset = 155;
if (Screen.safeArea.y != 0)
{//刘海屏
top_offset += Screen.safeArea.y;
}
WebviewManager.Instance.SetOffset(offset_y, offset_y1);
WebviewManager.Instance.SetPadding(0, top_offset / GRoot.inst.height, 0, buttom_offset / GRoot.inst.height);
WebviewManager.Instance.RefreshUrl();
// Debug.Log($"flyswitch==1 ------ {flyswitch == 1}");
// Debug.Log($"propswitch==1 ------ {propswitch == 1}");
WebviewManager.Instance.setFlyBtnTag(flyswitch == 1);
WebviewManager.Instance.setRewardBtnTag(propswitch == 1);
WebviewManager.Instance.SetDarkThough(true);
WebviewManager.Instance.ShowH5View(false);
WebviewManager.Instance.SetBtn(ConfigSystem.GetCommonConf().propCoord[0], ConfigSystem.GetCommonConf().propCoord[1], 60, 60);
}
});
}