FMOD功能迁移
This commit is contained in:
@@ -21,8 +21,7 @@ namespace AibisDream
|
||||
_ => HideDialog());
|
||||
}
|
||||
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, Action onTextShowed = null,
|
||||
bool isAutoSkip = false)
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false)
|
||||
{
|
||||
Debug.Log("CenterOption只显示选项");
|
||||
}
|
||||
|
||||
@@ -44,8 +44,7 @@ namespace AibisDream
|
||||
});
|
||||
}
|
||||
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, Action onTextShowed = null,
|
||||
bool isAutoSkip = false)
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false)
|
||||
{
|
||||
// 把原有对话清掉
|
||||
ClearBox();
|
||||
@@ -56,7 +55,6 @@ namespace AibisDream
|
||||
|
||||
// 自动跳过的回调很难独立Remove,只能全部清空再注册,下策
|
||||
_dialogText.onTextShowed.RemoveAllListeners();
|
||||
_dialogText.onTextShowed.AddListener(() => onTextShowed?.Invoke());
|
||||
_dialogText.onTextShowed.AddListener(() => EnumEventSystem.Global.Send(DialogEventEnum.LineShown));
|
||||
|
||||
_nextStep = nextStep;
|
||||
|
||||
@@ -87,8 +87,7 @@ namespace AibisDream
|
||||
/// <param name="nextStep">下一步</param>
|
||||
/// <param name="onTextShowed">文字展示结束后触发</param>
|
||||
/// <param name="isAutoSkip">是否自动跳过,默认为false</param>
|
||||
public virtual void ShowLine(string dialogLine, CharacterVo character, Action nextStep, Action onTextShowed,
|
||||
bool isAutoSkip = false)
|
||||
public virtual void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
|
||||
@@ -104,7 +103,6 @@ namespace AibisDream
|
||||
// 自动跳过的回调很难独立Remove,只能全部清空再注册,下策
|
||||
_dialogText.onTextShowed.RemoveAllListeners();
|
||||
_dialogText.onTextShowed.AddListener(() => _nextArray.gameObject.SetActive(true));
|
||||
_dialogText.onTextShowed.AddListener(() => onTextShowed?.Invoke());
|
||||
_dialogText.onTextShowed.AddListener(() => EnumEventSystem.Global.Send(DialogEventEnum.LineShown));
|
||||
|
||||
_nextStep = nextStep;
|
||||
|
||||
@@ -38,8 +38,7 @@ namespace AibisDream
|
||||
_dialogViews.ForEach(item => item.HideDialog());
|
||||
}
|
||||
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, Action onTextShowed,
|
||||
bool isAutoSkip = false)
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
// 根据角色信息气泡
|
||||
@@ -47,7 +46,7 @@ namespace AibisDream
|
||||
// 处理其他泡泡
|
||||
ProcessOtherBox();
|
||||
// 显示对话
|
||||
_currentView.ShowLine(dialogLine, character, nextStep, onTextShowed, isAutoSkip);
|
||||
_currentView.ShowLine(dialogLine, character, nextStep, isAutoSkip);
|
||||
}
|
||||
|
||||
public void ShowOptions(DialogOption[] options)
|
||||
|
||||
@@ -119,8 +119,7 @@ namespace AibisDream
|
||||
|
||||
#region 对话框接口
|
||||
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, Action onTextShowed = null,
|
||||
bool isAutoSkip = false)
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false)
|
||||
{
|
||||
// 根据DialogViewType确定在哪个对话框显示
|
||||
if (character.dialogViewType == DialogViewType.Default)
|
||||
@@ -132,7 +131,7 @@ namespace AibisDream
|
||||
|
||||
_lastShowView = _curView;
|
||||
// 没有指定对话框,就用当前激活的
|
||||
_curView.ShowLine(dialogLine, character, nextStep, onTextShowed, isAutoSkip);
|
||||
_curView.ShowLine(dialogLine, character, nextStep, isAutoSkip);
|
||||
}
|
||||
else if (_dialogViewDict.TryGetValue(character.dialogViewType, out var view))
|
||||
{
|
||||
@@ -143,7 +142,7 @@ namespace AibisDream
|
||||
|
||||
_lastShowView = view;
|
||||
// 对于指定了对话框的,就在指定对话框显示
|
||||
view.ShowLine(dialogLine, character, nextStep, onTextShowed, isAutoSkip);
|
||||
view.ShowLine(dialogLine, character, nextStep, isAutoSkip);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -10,8 +10,7 @@ namespace AibisDream
|
||||
{
|
||||
public interface IDialogView
|
||||
{
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, Action onTextShowed = null,
|
||||
bool isAutoSkip = false);
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false);
|
||||
|
||||
public void ShowOptions(DialogOption[] dialogueOptions);
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace AibisDream.Framework
|
||||
|
||||
public void ShowLine(string line, Action onTextEnd)
|
||||
{
|
||||
_typewriter.ShowText("");
|
||||
_typewriter.TextAnimator.SetText("");
|
||||
gameObject.SetActive(true);
|
||||
var formattedLine = CommonUtil.SplitString(line, maxCharNum);
|
||||
_typewriter.ShowText(formattedLine);
|
||||
|
||||
@@ -15,7 +15,6 @@ namespace AibisDream
|
||||
|
||||
private bool _skipLineDelay;
|
||||
private Action _nextStep;
|
||||
private Action _onTextShowed;
|
||||
private bool _isAutoSkip;
|
||||
private ActorRole _curRole;
|
||||
|
||||
@@ -55,8 +54,7 @@ namespace AibisDream
|
||||
|
||||
#endregion
|
||||
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, Action onTextShowed = null,
|
||||
bool isAutoSkip = false)
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
|
||||
@@ -80,7 +78,6 @@ namespace AibisDream
|
||||
|
||||
// 保留信息
|
||||
_nextStep = nextStep;
|
||||
_onTextShowed = onTextShowed;
|
||||
_isAutoSkip = isAutoSkip;
|
||||
_curRole = character.role;
|
||||
}
|
||||
@@ -131,8 +128,6 @@ namespace AibisDream
|
||||
{
|
||||
// 触发事件
|
||||
EnumEventSystem.Global.Send(DialogEventEnum.LineShown);
|
||||
// 停止语音
|
||||
_onTextShowed?.Invoke();
|
||||
|
||||
// 执行自动跳过结局
|
||||
if (_isAutoSkip)
|
||||
|
||||
Reference in New Issue
Block a user