佩佩初版流程跑通
This commit is contained in:
@@ -20,7 +20,7 @@ namespace AibisDream
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 开启对话
|
||||
/// �����Ի�
|
||||
/// </summary>
|
||||
/// <param name="yarnProject"></param>
|
||||
public void StartDialog(YarnProject yarnProject)
|
||||
@@ -30,9 +30,9 @@ namespace AibisDream
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 执行指令
|
||||
/// ִ��ָ��
|
||||
/// </summary>
|
||||
/// <param name="commandName">指令名称</param>
|
||||
/// <param name="commandName">ָ������</param>
|
||||
public void InvokeOptionCommand(string commandName, YarnOption[] options)
|
||||
{
|
||||
if (commandName == null) { }
|
||||
@@ -43,29 +43,29 @@ namespace AibisDream
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"没有找到 {commandName} 命令");
|
||||
Debug.LogWarning($"û���ҵ� {commandName} ����");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 注册带选项指令
|
||||
/// ע���ѡ��ָ��
|
||||
/// </summary>
|
||||
/// <param name="commandName">指令名称</param>
|
||||
/// <param name="commandAction">指令函数</param>
|
||||
/// <param name="commandName">ָ������</param>
|
||||
/// <param name="commandAction">ָ���</param>
|
||||
public void RegisterOptionCommand(string commandName, Action<YarnOption[]> commandAction)
|
||||
{
|
||||
if (commandMap.ContainsKey(commandName))
|
||||
{
|
||||
Debug.Log($"命令 {commandName} 并未注册,重新注册会替换旧指令");
|
||||
Debug.Log($"���� {commandName} ��δע�ᣬ����ע����滻��ָ��");
|
||||
}
|
||||
|
||||
commandMap[commandName] = commandAction;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 卸载指令
|
||||
/// ж��ָ��
|
||||
/// </summary>
|
||||
/// <param name="commandName">指令名称</param>
|
||||
/// <param name="commandName">ָ������</param>
|
||||
public void RemoveOptionCommand(string commandName)
|
||||
{
|
||||
if (commandMap.ContainsKey(commandName))
|
||||
@@ -74,11 +74,11 @@ namespace AibisDream
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log($"命令 {commandName} 并未注册,重新注册会替换旧指令");
|
||||
Debug.Log($"���� {commandName} ��δע�ᣬ����ע����滻��ָ��");
|
||||
}
|
||||
}
|
||||
|
||||
#region 各种命令
|
||||
#region ��������
|
||||
[YarnCommand("switch_tv")]
|
||||
public static void SwitchTV(string picName)
|
||||
{
|
||||
@@ -114,6 +114,12 @@ namespace AibisDream
|
||||
{
|
||||
yield return SceneLoader.Instance.LoadSceneAsync(sceneName);
|
||||
}
|
||||
[YarnCommand("unload_scene")]
|
||||
public static IEnumerator UnloadScene(string sceneName)
|
||||
{
|
||||
yield return SceneLoader.Instance.UnloadSceneAsync(sceneName);
|
||||
}
|
||||
|
||||
|
||||
[YarnCommand("init_fix")]
|
||||
public static void InitFix()
|
||||
|
||||
Reference in New Issue
Block a user