提交修改

This commit is contained in:
Bob.Song
2026-03-06 09:44:00 +08:00
parent e125bb869e
commit db7bc90fe2
3631 changed files with 9050 additions and 395938 deletions

View File

@@ -1,73 +1,28 @@
using UnityEngine;
using UnityEngine.Video;
namespace NBF
{
public class Init : MonoBehaviour
{
[SerializeField] private VideoPlayer videoPlayer;
[SerializeField] private GameObject startCanvas;
[SerializeField] private bool playVideo;
private void CheckOver(VideoPlayer vp)
{
Destroy(startCanvas);
StartGame();
}
private void Awake()
{
Debug.Log($"assetsPath = {Application.streamingAssetsPath} persistentDataPath={Application.persistentDataPath}");
DontDestroyOnLoad(gameObject);
Game.SetInitCallback(gameObject, InitCallback);
}
private void OnDestroy()
{
PermanentCommon.Dispose();
}
void InitCallback()
{
ES3.Init();
ES3.Save("NBF", 1);
if (!playVideo)
{
videoPlayer.Stop();
}
else
{
videoPlayer.loopPointReached += CheckOver;
}
QualitySettings.vSyncCount = 0;
if (!playVideo)
{
CheckOver(videoPlayer);
}
}
public void StartGame()
{
PermanentCommon.Init();
InputDef.LoadIcon();
OpenUI();
}
private void OpenUI()
{
// await Task.Delay(100);
CommonTopPanel.Show();
// SettingPanel.Show();
LoginPanel.Show();
// SettingPanel.Show();
// MessageBox.Show();
// FishingShopPanel.Show();
// PreviewPanel.Show();
}
}
}
// using UnityEngine;
// using UnityEngine.Video;
//
// namespace NBF
// {
// public class Init : MonoBehaviour
// {
//
// private void Awake()
// {
// Debug.Log($"assetsPath = {Application.streamingAssetsPath} persistentDataPath={Application.persistentDataPath}");
// DontDestroyOnLoad(gameObject);
// Game.SetInitCallback(gameObject, StartGame);
// }
//
//
// public void StartGame()
// {
// OpenUI();
// }
//
//
// private void OpenUI()
// {
//
// }
// }
// }