本地化问题修改
This commit is contained in:
@@ -21,7 +21,7 @@ namespace AibisDream
|
||||
_ => HideDialog());
|
||||
}
|
||||
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false)
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, string lineId, bool isAutoSkip = false)
|
||||
{
|
||||
Debug.Log("CenterOption只显示选项");
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace AibisDream
|
||||
});
|
||||
}
|
||||
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false)
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, string lineId, bool isAutoSkip = false)
|
||||
{
|
||||
// 把原有对话清掉
|
||||
ClearBox();
|
||||
|
||||
@@ -85,8 +85,9 @@ namespace AibisDream
|
||||
/// <param name="dialogLine">对话内容</param>
|
||||
/// <param name="character">角色内容</param>
|
||||
/// <param name="nextStep">下一步</param>
|
||||
/// <param name="lineId">行号</param>
|
||||
/// <param name="isAutoSkip">是否自动跳过,默认为false</param>
|
||||
public virtual void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false)
|
||||
public virtual void ShowLine(string dialogLine, CharacterVo character, Action nextStep, string lineId, bool isAutoSkip = false)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace AibisDream
|
||||
_dialogViews.ForEach(item => item.HideDialog());
|
||||
}
|
||||
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false)
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, string lineId, bool isAutoSkip = false)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
// 根据角色信息气泡
|
||||
@@ -46,7 +46,7 @@ namespace AibisDream
|
||||
// 处理其他泡泡
|
||||
ProcessOtherBox();
|
||||
// 显示对话
|
||||
_currentView.ShowLine(dialogLine, character, nextStep, isAutoSkip);
|
||||
_currentView.ShowLine(dialogLine, character, nextStep, lineId, isAutoSkip);
|
||||
}
|
||||
|
||||
public void ShowOptions(DialogOption[] options)
|
||||
|
||||
@@ -22,7 +22,10 @@ namespace AibisDream
|
||||
public override void OnSingletonInit()
|
||||
{
|
||||
InitEvent();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// 默认对话框直接加载
|
||||
var box = transform.Find("Dialog Box").GetComponent<IDialogView>();
|
||||
RegisterDialogView(DialogViewType.OldBox, box);
|
||||
@@ -30,10 +33,8 @@ namespace AibisDream
|
||||
RegisterDialogView(DialogViewType.CenterText, centerText);
|
||||
var centerOption = transform.Find("Center Option").GetComponent<IDialogView>();
|
||||
RegisterDialogView(DialogViewType.CenterOption, centerOption);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
RegisterDialogView(DialogViewType.Task, UIManager.Instance.GetPanel<TaskPanel>());
|
||||
|
||||
_curView = _dialogViewDict[DialogViewType.OldBox];
|
||||
}
|
||||
|
||||
@@ -93,7 +94,7 @@ namespace AibisDream
|
||||
|
||||
#region 对话框接口
|
||||
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false)
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, string lineId, bool isAutoSkip = false)
|
||||
{
|
||||
// 根据DialogViewType确定在哪个对话框显示
|
||||
if (character.dialogViewType == DialogViewType.Default)
|
||||
@@ -105,7 +106,7 @@ namespace AibisDream
|
||||
|
||||
_lastShowView = _curView;
|
||||
// 没有指定对话框,就用当前激活的
|
||||
_curView.ShowLine(dialogLine, character, nextStep, isAutoSkip);
|
||||
_curView.ShowLine(dialogLine, character, nextStep, lineId, isAutoSkip);
|
||||
}
|
||||
else if (_dialogViewDict.TryGetValue(character.dialogViewType, out var view))
|
||||
{
|
||||
@@ -116,7 +117,7 @@ namespace AibisDream
|
||||
|
||||
_lastShowView = view;
|
||||
// 对于指定了对话框的,就在指定对话框显示
|
||||
view.ShowLine(dialogLine, character, nextStep, isAutoSkip);
|
||||
view.ShowLine(dialogLine, character, nextStep, lineId, isAutoSkip);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -208,6 +209,7 @@ namespace AibisDream
|
||||
OldBox,
|
||||
Screen,
|
||||
CenterText,
|
||||
CenterOption
|
||||
CenterOption,
|
||||
Task
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ namespace AibisDream
|
||||
{
|
||||
public interface IDialogView
|
||||
{
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false);
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, string lineId ,bool isAutoSkip = false);
|
||||
|
||||
public void ShowOptions(DialogOption[] dialogueOptions);
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace AibisDream
|
||||
|
||||
#endregion
|
||||
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false)
|
||||
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, string lineId, bool isAutoSkip = false)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user