Files
ichni_Official/Assets/Scripts/Menu/MenuManager.cs
SoulliesOfficial 6aa498f6be
2025-08-11 14:04:06 -04:00

63 lines
1.7 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using AK.Wwise;
using Ichni.Menu;
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 SettingsUIPage settingsUIPage;
}
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()
{
MenuInputManager.instance.gameInput.Menu.Disable();
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();
}
}
}