67 lines
1.6 KiB
C#
67 lines
1.6 KiB
C#
using System.Collections;
|
||
using System.Collections.Generic;
|
||
using Unity.VisualScripting;
|
||
using UnityEngine;
|
||
using UnityEngine.AddressableAssets;
|
||
using UnityEngine.Rendering;
|
||
|
||
namespace AibisDream
|
||
{
|
||
public class GameLoopManager : Singleton<GameLoopManager>
|
||
{
|
||
[Header("��һ���Ի�")]
|
||
[SerializeField] private TalkSceneSO firstTalkSO;
|
||
|
||
private TalkSceneSO currentTalkSceneSO;
|
||
|
||
[SerializeField]
|
||
private string clinicScene;
|
||
|
||
[SerializeField]
|
||
private RunMode runMode;
|
||
|
||
[SerializeField]
|
||
private string testScene;
|
||
|
||
private void Start()
|
||
{
|
||
if (runMode == RunMode.Pro)
|
||
{
|
||
// ����
|
||
GameObject UI = GameObject.Find("UI");
|
||
UI.SetActive(true);
|
||
}
|
||
else if (runMode == RunMode.Test)
|
||
{
|
||
if (testScene == null)
|
||
{
|
||
Debug.Log("��������Գ�������");
|
||
}
|
||
|
||
// ����������
|
||
SceneLoader.Instance.LoadScene(testScene);
|
||
}
|
||
}
|
||
|
||
public void StartNewGame()
|
||
{
|
||
currentTalkSceneSO = firstTalkSO;
|
||
|
||
StartCoroutine(LoadClinicScene());
|
||
}
|
||
|
||
private IEnumerator LoadClinicScene()
|
||
{
|
||
yield return StartCoroutine(SceneLoader.Instance.LoadSceneAsync(clinicScene));
|
||
StartMenuViewer.Instance.HideStartMenu();
|
||
DialogController.Instance.StartDialog(currentTalkSceneSO.yarnProject);
|
||
}
|
||
}
|
||
|
||
public enum RunMode
|
||
{
|
||
Test, Pro
|
||
}
|
||
}
|
||
|