Files
ichni_Official/Assets/Scripts/Menu/MenuManager.cs

62 lines
1.6 KiB
C#
Raw Normal View History

2025-06-03 02:42:28 -04:00
using System;
using System.Collections;
using System.Collections.Generic;
using AK.Wwise;
2025-07-08 14:28:40 -04:00
using Ichni.Menu.UI;
2025-06-14 14:42:49 -04:00
using Ichni.Story.UI;
2025-06-06 10:14:55 -04:00
using Ichni.UI;
2025-06-03 02:42:28 -04:00
using Sirenix.OdinInspector;
using UnityEngine;
using UnityEngine.SceneManagement;
2025-06-06 10:14:55 -04:00
using UnityEngine.Serialization;
2025-06-03 02:42:28 -04:00
2025-06-06 10:14:55 -04:00
namespace Ichni
2025-06-03 02:42:28 -04:00
{
public partial class MenuManager : MonoBehaviour
2025-06-06 10:14:55 -04:00
{
public static MenuManager instance;
2025-06-14 14:42:49 -04:00
public StartUIPage startUIPage;
public ChapterSelectionUIPage chapterSelectionUIPage;
public StoryUIPage storyUIPage;
public DialogUIPage dialogUIPage;
public SongSelectionUIPage songSelectionUIPage;
public PrepareUIPage prepareUIPage;
2025-06-06 10:14:55 -04:00
}
public partial class MenuManager
2025-06-03 02:42:28 -04:00
{
AsyncOperation asyncOperation;
private void Awake()
{
2025-06-06 10:14:55 -04:00
instance = this;
2025-06-03 02:42:28 -04:00
Application.targetFrameRate = 120;
2025-06-06 10:14:55 -04:00
}
private void Start()
{
asyncOperation = SceneManager.LoadSceneAsync("GameScene");
asyncOperation.allowSceneActivation = false;
2025-06-03 02:42:28 -04:00
}
}
2025-06-06 10:14:55 -04:00
public partial class MenuManager
2025-06-03 02:42:28 -04:00
{
public void TestEnterGame()
{
2025-06-06 10:14:55 -04:00
asyncOperation.allowSceneActivation = true;
2025-06-03 02:42:28 -04:00
}
[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();
}
}
}