新增测试模式;增加选择项接入
This commit is contained in:
@@ -4,12 +4,17 @@ using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.Rendering;
|
||||
using Yarn.Unity;
|
||||
|
||||
namespace AibisDream
|
||||
{
|
||||
public class GameLoopManager : Singleton<GameLoopManager>
|
||||
{
|
||||
[Header("µÚÒ»¸ö¶Ô»°")]
|
||||
[Header("运行模式")]
|
||||
[SerializeField]
|
||||
private RunMode runMode;
|
||||
|
||||
[Header("正式环境参数")]
|
||||
[SerializeField] private TalkSceneSO firstTalkSO;
|
||||
|
||||
private TalkSceneSO currentTalkSceneSO;
|
||||
@@ -17,6 +22,19 @@ namespace AibisDream
|
||||
[SerializeField]
|
||||
private string clinicScene;
|
||||
|
||||
[Header("测试环境参数")]
|
||||
[SerializeField] private string testYarnProject;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
if (runMode == RunMode.Test)
|
||||
{
|
||||
GameObject gameObject = GameObject.Find("UI");
|
||||
gameObject.transform.Find("Main Canvas").gameObject.SetActive(false);
|
||||
StartTestGame();
|
||||
}
|
||||
}
|
||||
|
||||
public void StartNewGame()
|
||||
{
|
||||
currentTalkSceneSO = firstTalkSO;
|
||||
@@ -30,6 +48,14 @@ namespace AibisDream
|
||||
StartMenuViewer.Instance.HideStartMenu();
|
||||
DialogController.Instance.StartDialog(currentTalkSceneSO.yarnProject);
|
||||
}
|
||||
|
||||
public void StartTestGame()
|
||||
{
|
||||
SceneLoader.Instance.LoadScene(clinicScene);
|
||||
var proj = Resources.Load<YarnProject>($"Yarn/{testYarnProject}/{testYarnProject}");
|
||||
Debug.Log(proj == null);
|
||||
DialogController.Instance.StartDialog(proj);
|
||||
}
|
||||
}
|
||||
|
||||
public enum RunMode
|
||||
|
||||
Reference in New Issue
Block a user