Initial commit
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Yarn.Unity;
|
||||
|
||||
namespace AibisDream
|
||||
{
|
||||
public class AudioView : DialogueViewBase
|
||||
{
|
||||
public override void RunLine(LocalizedLine dialogueLine, Action onDialogueLineFinished)
|
||||
{
|
||||
base.RunLine(dialogueLine, onDialogueLineFinished);
|
||||
}
|
||||
|
||||
public override void RunOptions(DialogueOption[] dialogueOptions, Action<int> onOptionSelected)
|
||||
{
|
||||
base.RunOptions(dialogueOptions, onOptionSelected);
|
||||
}
|
||||
|
||||
public override void InterruptLine(LocalizedLine dialogueLine, Action onDialogueLineFinished)
|
||||
{
|
||||
base.InterruptLine(dialogueLine, onDialogueLineFinished);
|
||||
}
|
||||
|
||||
public override void DismissLine(Action onDismissalComplete)
|
||||
{
|
||||
base.DismissLine(onDismissalComplete);
|
||||
}
|
||||
|
||||
public override void UserRequestedViewAdvancement()
|
||||
{
|
||||
base.UserRequestedViewAdvancement();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d87f76a6ddf0704dae7951db3c76ea0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,80 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.SceneManagement;
|
||||
using Yarn.Unity;
|
||||
|
||||
namespace AibisDream
|
||||
{
|
||||
public class DialogController : Singleton<DialogController>
|
||||
{
|
||||
private DialogueRunner dialogueRunner;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
dialogueRunner = GetComponentInChildren<DialogueRunner>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ¿ªÆô¶Ô»°
|
||||
/// </summary>
|
||||
/// <param name="yarnProject"></param>
|
||||
public void StartDialog(YarnProject yarnProject)
|
||||
{
|
||||
dialogueRunner.SetProject(yarnProject);
|
||||
dialogueRunner.StartDialogue("Start");
|
||||
}
|
||||
|
||||
#region ¸÷ÖÖÃüÁî
|
||||
[YarnCommand("switch_tv")]
|
||||
public static void SwitchTV(string picName)
|
||||
{
|
||||
Debug.Log($"switch_tv {picName}");
|
||||
}
|
||||
|
||||
[YarnCommand("indoor")]
|
||||
public static void Indoor()
|
||||
{
|
||||
MainUIController.Instance.HideMainUI();
|
||||
}
|
||||
|
||||
[YarnCommand("character_into")]
|
||||
public static void CharacterInto(string picName)
|
||||
{
|
||||
Debug.Log($"character_into {picName}");
|
||||
}
|
||||
|
||||
[YarnCommand("character_moveto_fix")]
|
||||
public static void CharacterMoveToFix()
|
||||
{
|
||||
Debug.Log("character_moveto_fix");
|
||||
}
|
||||
|
||||
[YarnCommand("cover")]
|
||||
public static void Cover()
|
||||
{
|
||||
Debug.Log("Cover");
|
||||
}
|
||||
|
||||
[YarnCommand("load_scene")]
|
||||
public static IEnumerator LoadScene(string sceneName)
|
||||
{
|
||||
yield return SceneLoader.Instance.LoadSceneAsync(sceneName);
|
||||
}
|
||||
|
||||
[YarnCommand("init_fix")]
|
||||
public static void InitFix()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[YarnCommand("hide_dialog")]
|
||||
public static void HideDialog()
|
||||
{
|
||||
DialogUiViewer.Instance.HideDialog();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8912c53f0d9943940a6bb7e59888ada8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Yarn.Unity;
|
||||
|
||||
namespace AibisDream
|
||||
{
|
||||
public class LineView : DialogueViewBase
|
||||
{
|
||||
public override void RunLine(LocalizedLine dialogueLine, Action onDialogueLineFinished)
|
||||
{
|
||||
DialogUiViewer.Instance.ShowLine(dialogueLine.TextWithoutCharacterName.Text, dialogueLine.CharacterName, onDialogueLineFinished);
|
||||
Debug.Log(dialogueLine.Text.Text);
|
||||
}
|
||||
|
||||
public override void RunOptions(DialogueOption[] dialogueOptions, Action<int> onOptionSelected)
|
||||
{
|
||||
base.RunOptions(dialogueOptions, onOptionSelected);
|
||||
}
|
||||
|
||||
public override void InterruptLine(LocalizedLine dialogueLine, Action onDialogueLineFinished)
|
||||
{
|
||||
base.InterruptLine(dialogueLine, onDialogueLineFinished);
|
||||
}
|
||||
|
||||
public override void DismissLine(Action onDismissalComplete)
|
||||
{
|
||||
base.DismissLine(onDismissalComplete);
|
||||
}
|
||||
|
||||
public override void UserRequestedViewAdvancement()
|
||||
{
|
||||
base.UserRequestedViewAdvancement();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 465bacc132ec6ce4e85f8e68354f60ad
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user