Files
ichni_Official/Assets/Scripts/Menu/MenuManager.cs
SoulliesOfficial b19469976a Menu基本完成
2025-06-14 14:42:49 -04:00

61 lines
1.6 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using AK.Wwise;
using Ichni.Story.UI;
using Ichni.UI;
using Sirenix.OdinInspector;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.Serialization;
namespace Ichni
{
public partial class MenuManager : MonoBehaviour
{
public static MenuManager instance;
public StartUIPage startUIPage;
public ChapterSelectionUIPage chapterSelectionUIPage;
public StoryUIPage storyUIPage;
public DialogUIPage dialogUIPage;
public SongSelectionUIPage songSelectionUIPage;
public PrepareUIPage prepareUIPage;
}
public partial class MenuManager
{
AsyncOperation asyncOperation;
private void Awake()
{
instance = this;
Application.targetFrameRate = 120;
}
private void Start()
{
asyncOperation = SceneManager.LoadSceneAsync("GameScene");
asyncOperation.allowSceneActivation = false;
}
}
public partial class MenuManager
{
public void TestEnterGame()
{
asyncOperation.allowSceneActivation = true;
}
[Button]
public void LanguageSwitch(string language)
{
//Set I2 Localization language
I2.Loc.LocalizationManager.CurrentLanguage = language;
//Debug.Log("Language switched to: " + language);
// Update the UI or any other components that depend on the language change
I2.Loc.LocalizationManager.UpdateSources();
}
}
}