h5sdk提交
This commit is contained in:
@@ -3,6 +3,12 @@ using UnityEngine;
|
||||
using BingoBrain.Asset;
|
||||
using BingoBrain.HotFix;
|
||||
using Unity.VisualScripting;
|
||||
using DontConfuse;
|
||||
using FairyGUI;
|
||||
using DG.Tweening;
|
||||
|
||||
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
@@ -24,6 +30,9 @@ namespace BingoBrain
|
||||
|
||||
protected override void OnSwhSceCompl(object param = null)
|
||||
{
|
||||
#if UNITY_EDITOR||BingoBrainRelease
|
||||
GameObject.Find("IngameDebugConsole").SetActive(false);
|
||||
#endif
|
||||
StartUpAppProcess();
|
||||
}
|
||||
|
||||
@@ -39,8 +48,8 @@ namespace BingoBrain
|
||||
{
|
||||
CtrlDispatcher.Instance.AddListener(CtrlMsg.Login_Succeed, OnLoginSucceed);
|
||||
// #if !UNITY_EDITOR && UNITY_ANDROID
|
||||
MaxADKit.Init();
|
||||
Debug.Log("init");
|
||||
MaxADKit.Init();
|
||||
Debug.Log("init");
|
||||
// #endif
|
||||
OnInitAsset();
|
||||
AppDispatcher.Instance.AddListener(CsjInfoC.UI_LoadingInitAsset, OnInitAsset);
|
||||
@@ -56,15 +65,15 @@ namespace BingoBrain
|
||||
AppDispatcher.Instance.Dispatch(CsjInfoC.AppManagerRegister);
|
||||
AppDispatcher.Instance.Dispatch(CsjInfoC.InitUIMgr);
|
||||
AppDispatcher.Instance.AddListener(CsjInfoC.LoginInit, OnLoadingComplete);
|
||||
PreferencesMgr.Instance.InitPreferences();
|
||||
NetworkDispatcher.Instance.Dispatch(ExternalInfo.GetConfig);//quxiaozhushi
|
||||
NetworkDispatcher.Instance.AddListener(NetworkMsg.Start,ShowScene);//quxiaozhushi
|
||||
// PreferencesMgr.Instance.InitPreferences();
|
||||
// NetworkDispatcher.Instance.Dispatch(ExternalInfo.GetConfig);//quxiaozhushi
|
||||
// NetworkDispatcher.Instance.AddListener(NetworkMsg.Start, ShowScene);//quxiaozhushi
|
||||
}
|
||||
|
||||
private void OnLoadingComplete(object param = null)
|
||||
{
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.Game_StartReady);
|
||||
TimerHelper.mEasy.AddTimer(0.1f, () =>
|
||||
DOVirtual.DelayedCall(0.1f, () =>
|
||||
{
|
||||
Audio.Instance.InitDefaultButtonClickSound(DoConst.UIButtonDefault);
|
||||
ModuleBoardk.Instance.AllModuleGameStart();
|
||||
@@ -72,13 +81,44 @@ namespace BingoBrain
|
||||
SaveingPotHelper.CheckSaveingPot();
|
||||
SaveingPotHelper.TestingClearTime();
|
||||
// HideLoadingUI();
|
||||
});
|
||||
}
|
||||
if (GameHelper.IsGiftSwitch())
|
||||
{
|
||||
WebviewManager.Instance.SetFullScreen();
|
||||
int flyswitch = ConfigSystem.GetConfig<CommonModel>().flyswitch;
|
||||
int propswitch = ConfigSystem.GetConfig<CommonModel>().propswitch;
|
||||
|
||||
int offset_y = ConfigSystem.GetConfig<CommonModel>().WVOffset[0];
|
||||
int offset_y1 = ConfigSystem.GetConfig<CommonModel>().WVOffset[1];
|
||||
Debug.Log("barry offset_y: " + offset_y + " offset_y1: " + offset_y1);
|
||||
float top_offset = 150;//fgui中的顶部信息的高度
|
||||
float buttom_offset = 0;
|
||||
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.GetConfig<CommonModel>().propCoord[0], ConfigSystem.GetConfig<CommonModel>().propCoord[1], 60, 60);
|
||||
}
|
||||
});
|
||||
SaveingPotHelper.ResetHistory();
|
||||
}
|
||||
private bool isopen = false;
|
||||
private void ShowScene(object a = null)
|
||||
{
|
||||
if (isopen) return;
|
||||
UICtrlDispatcher.Instance.Dispatch(SkinInfo.EnterBingoUI_Open);
|
||||
GameHelper.PostFunnelLogin("enterButtonShow");
|
||||
isopen = true;
|
||||
LoginSystem_sdk.Instance.RequestLogin();
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
|
||||
Reference in New Issue
Block a user