fix:1、更换项目,使用winter来创建

This commit is contained in:
2026-04-22 11:13:16 +08:00
parent 173cfb2dc9
commit 83ff9f71ad
7375 changed files with 209752 additions and 157557 deletions
+40 -54
View File
@@ -1,13 +1,15 @@
// #if UNITY_EDITOR
// #endif
using System.Collections.Generic;
using FairyGUI;
using System.Diagnostics;
using System.IO;
using DG.Tweening;
using IgnoreOPS;
using Unity.VisualScripting;
using UnityEngine;
using SGModule.ApplePay;
using SGModule.NetKit;
namespace FlowerPower
namespace LoveLegend
{
public class MainScene : BaseScene
{
@@ -41,10 +43,9 @@ namespace FlowerPower
// SuperApplication.Instance.AddComponent<AppsFlyerObjectScript1>();
// no net
// #if !UNITY_EDITOR && UNITY_IOS
// MaxADKit.Init();
// #endif
#if !UNITY_EDITOR && UNITY_ANDROID
// MaxADKit.Init();
#endif
#if UNITY_EDITOR
isAssetBundleLoad = false;
@@ -54,7 +55,7 @@ namespace FlowerPower
if (isAssetBundleLoad)
{
int value = 0;
GemCrushFileKit.GetLocalAssetBundle(
LegendFileKit.GetLocalAssetBundle(
max => { GameDispatcher.Instance.Dispatch(GameMsg.UpdateHotFixMax, max + 1); }, () =>
{
value++;
@@ -65,9 +66,10 @@ namespace FlowerPower
{
OnInitAsset();
}
UnityManager.Instance.DakaiACT();
AppDispatcher.Instance.AddListener(AppMsg.UI_LoadingInitAsset, OnInitAsset);
TrackKit.TrackLoginFunnel(LoginFunnelEventType.AfSend);
TrackKit.TrackLoginFunnel(LoginFunnelEventType.AfRecv, "success");
}
private void OnLoginSucceed(object param = null)
@@ -77,13 +79,14 @@ namespace FlowerPower
private void OnInitAsset(object param = null)
{
AppDispatcher.Instance.Dispatch(AppMsg.AppManagerRegister);
AppDispatcher.Instance.Dispatch(AppMsg.InitUIMgr);
NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
AppDispatcher.Instance.AddListener(AppMsg.LoginInit, OnLoadingComplete);
PreferencesMgr.Instance.InitPreferences();
// no net
// PreferencesMgr.Instance.InitPreferences();
// NetworkDispatcher.Instance.Dispatch(NetworkMsg.GetConfig);
}
@@ -92,50 +95,15 @@ namespace FlowerPower
// Debug.Log("OnLoadingComplete------------");
CtrlDispatcher.Instance.Dispatch(CtrlMsg.Game_StartReady);
if (GameHelper.IsGiftSwitch()) CrazyAsyKit.StartCoroutine(TextureHelper.WriteTempBeforeOpenCoroutine_());
TimerHelper.mEasy.AddTimer(3.0f, () =>
TimerHelper.mEasy.AddTimer(0.5f, () =>
{
AudioManager.Instance.InitDefaultButtonClickSound(AudioConst.click);
AudioManager.Instance.InitDefaultButtonClickSound(AudioConst.UIButtonDefault);
ModuleManager.Instance.AllModuleGameStart();
ShowScene();
SaveingPotHelper.CheckSaveingPot();
SaveingPotHelper.TestingClearTime();
// 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];
//
// float top_offset = 0;//fgui中的顶部信息的高度
// float buttom_offset = 157;
// if (Screen.safeArea.y != 0)
// {//刘海屏
// top_offset += Screen.safeArea.y;
// }
// // Debug.Log(ConfigSystem.GetConfig<CommonModel>().NewWVswitch);
// //ConfigSystem.GetConfig<CommonModel>().NewWVswitch = 0;
// if ((Random.Range(0, 100) < ConfigSystem.GetConfig<CommonModel>().NewWVswitch)&&GameHelper.IsGiftSwitch())
// {
// WebviewManager.Instance.is_use_otherweb = true;
// WebviewManager.Instance.useOtherWeb(WebviewManager.Instance.is_use_otherweb);
// }
// else WebviewManager.Instance.useOtherWeb(false);
// 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.ShowH5View(false);
// WebviewManager.Instance.SetBtn(ConfigSystem.GetConfig<CommonModel>().propCoord[0], ConfigSystem.GetConfig<CommonModel>().propCoord[1], 60, 60);
//
// // }
});
}
@@ -144,11 +112,29 @@ namespace FlowerPower
{
if (is_open) return;
is_open = true;
PreDownloadManager.InitializeLiveData();
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.GameLoginUI_Open);
ChatHelper.CheckReply();
if (GameHelper.IsGiftSwitch())
{
PreDownloadManager.StartDownloadLivePicture();
PreDownloadManager.StartDownloadAlbumsPicture();
//预下载视频
PreDownloadManager.StartDownload();
PreDownloadManager.StartDownloadSecretPicture();
// DOVirtual.DelayedCall(2, () =>
// {
// ApplePayManager.GetVipHistory();
// });
}
}
public override void Dispose()
{
}
}
}
}