2026-05-15 16:15:09 +08:00
|
|
|
using BingoBrain.Core;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using BingoBrain.Asset;
|
|
|
|
|
using BingoBrain.HotFix;
|
|
|
|
|
using Unity.VisualScripting;
|
2026-07-06 16:31:08 +08:00
|
|
|
using DontConfuse;
|
|
|
|
|
using FairyGUI;
|
|
|
|
|
using DG.Tweening;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-05-15 16:15:09 +08:00
|
|
|
#if UNITY_EDITOR
|
|
|
|
|
using UnityEditor;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
namespace BingoBrain
|
|
|
|
|
{
|
|
|
|
|
public class BingoScene : BaseScene
|
|
|
|
|
{
|
|
|
|
|
public override int SceneIdx => 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected override void OnEnter()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnLeave()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnSwhSceCompl(object param = null)
|
|
|
|
|
{
|
2026-07-06 16:31:08 +08:00
|
|
|
#if UNITY_EDITOR||BingoBrainRelease
|
|
|
|
|
GameObject.Find("IngameDebugConsole").SetActive(false);
|
|
|
|
|
#endif
|
2026-05-15 16:15:09 +08:00
|
|
|
StartUpAppProcess();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void StartUpAppProcess()
|
|
|
|
|
{
|
|
|
|
|
Debug.Log("[ BingoBrain ] [ MainScene ] Start Up App Process");
|
|
|
|
|
|
|
|
|
|
// 初始化资源
|
|
|
|
|
OnPermanentAssetsInitComplete();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnPermanentAssetsInitComplete(object param = null)
|
|
|
|
|
{
|
|
|
|
|
CtrlDispatcher.Instance.AddListener(CtrlMsg.Login_Succeed, OnLoginSucceed);
|
|
|
|
|
// #if !UNITY_EDITOR && UNITY_ANDROID
|
2026-07-06 16:31:08 +08:00
|
|
|
MaxADKit.Init();
|
|
|
|
|
Debug.Log("init");
|
2026-05-15 16:15:09 +08:00
|
|
|
// #endif
|
|
|
|
|
OnInitAsset();
|
|
|
|
|
AppDispatcher.Instance.AddListener(CsjInfoC.UI_LoadingInitAsset, OnInitAsset);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnLoginSucceed(object param = null)
|
|
|
|
|
{
|
|
|
|
|
CtrlDispatcher.Instance.RemoveListener(CtrlMsg.Login_Succeed, OnLoginSucceed);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnInitAsset(object param = null)
|
|
|
|
|
{
|
|
|
|
|
AppDispatcher.Instance.Dispatch(CsjInfoC.AppManagerRegister);
|
|
|
|
|
AppDispatcher.Instance.Dispatch(CsjInfoC.InitUIMgr);
|
|
|
|
|
AppDispatcher.Instance.AddListener(CsjInfoC.LoginInit, OnLoadingComplete);
|
2026-07-06 16:31:08 +08:00
|
|
|
// PreferencesMgr.Instance.InitPreferences();
|
|
|
|
|
// NetworkDispatcher.Instance.Dispatch(ExternalInfo.GetConfig);//quxiaozhushi
|
|
|
|
|
// NetworkDispatcher.Instance.AddListener(NetworkMsg.Start, ShowScene);//quxiaozhushi
|
2026-05-15 16:15:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnLoadingComplete(object param = null)
|
|
|
|
|
{
|
|
|
|
|
CtrlDispatcher.Instance.Dispatch(CtrlMsg.Game_StartReady);
|
2026-07-06 16:31:08 +08:00
|
|
|
DOVirtual.DelayedCall(0.1f, () =>
|
2026-05-15 16:15:09 +08:00
|
|
|
{
|
|
|
|
|
Audio.Instance.InitDefaultButtonClickSound(DoConst.UIButtonDefault);
|
|
|
|
|
ModuleBoardk.Instance.AllModuleGameStart();
|
|
|
|
|
ShowScene();
|
|
|
|
|
SaveingPotHelper.CheckSaveingPot();
|
|
|
|
|
SaveingPotHelper.TestingClearTime();
|
|
|
|
|
// HideLoadingUI();
|
2026-07-07 15:58:59 +08:00
|
|
|
if (true)
|
2026-07-06 16:31:08 +08:00
|
|
|
{
|
2026-07-08 17:47:04 +08:00
|
|
|
|
|
|
|
|
|
2026-07-06 16:31:08 +08:00
|
|
|
}
|
2026-05-15 16:15:09 +08:00
|
|
|
});
|
2026-07-06 16:31:08 +08:00
|
|
|
SaveingPotHelper.ResetHistory();
|
2026-05-15 16:15:09 +08:00
|
|
|
}
|
2026-07-06 16:31:08 +08:00
|
|
|
private bool isopen = false;
|
2026-05-15 16:15:09 +08:00
|
|
|
private void ShowScene(object a = null)
|
|
|
|
|
{
|
2026-07-06 16:31:08 +08:00
|
|
|
if (isopen) return;
|
2026-05-15 16:15:09 +08:00
|
|
|
UICtrlDispatcher.Instance.Dispatch(SkinInfo.EnterBingoUI_Open);
|
|
|
|
|
GameHelper.PostFunnelLogin("enterButtonShow");
|
2026-07-06 16:31:08 +08:00
|
|
|
isopen = true;
|
2026-07-08 17:47:04 +08:00
|
|
|
LoginSystem_sdk.Instance.RequestLogin();
|
2026-05-15 16:15:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Dispose()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|