本地化

This commit is contained in:
2025-04-25 20:24:11 +08:00
parent 165d154784
commit d69ad072ea
127 changed files with 12788 additions and 1647 deletions
+2 -3
View File
@@ -61,7 +61,7 @@ namespace AibisDream
_dialogText = transform.Find(DialogText)?.gameObject.GetComponent<TypewriterByCharacter>();
_nextArray = transform.Find(NextArray)?.gameObject;
_choiceBox = transform.Find(ChoiceBox)?.gameObject;
OnAwake();
}
@@ -85,7 +85,6 @@ namespace AibisDream
/// <param name="dialogLine">对话内容</param>
/// <param name="character">角色内容</param>
/// <param name="nextStep">下一步</param>
/// <param name="onTextShowed">文字展示结束后触发</param>
/// <param name="isAutoSkip">是否自动跳过,默认为false</param>
public virtual void ShowLine(string dialogLine, CharacterVo character, Action nextStep, bool isAutoSkip = false)
{
@@ -196,7 +195,7 @@ namespace AibisDream
{
if (!_actorName) return;
if (string.IsNullOrWhiteSpace(character.GetActorName()))
if (string.IsNullOrWhiteSpace(character.key))
{
_actorName.transform.parent.gameObject.SetActive(false);
}
@@ -3,22 +3,17 @@ using System.Collections.Generic;
using System.Text;
using AibisDream.Framework;
using AibisDream.Kit;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
namespace AibisDream
{
public class DialogCanvasManager : Singleton<DialogCanvasManager>, IDialogView
{
private const string QuickTalk = "Quick Talk";
#region
private readonly Dictionary<DialogViewType, IDialogView> _dialogViewDict = new();
private IDialogView _curView;
private IDialogView _lastShowView;
private GameObject _quickTalkButton;
#endregion
@@ -26,7 +21,6 @@ namespace AibisDream
public override void OnSingletonInit()
{
InitQuickTalkButton();
InitEvent();
// 默认对话框直接加载
@@ -74,29 +68,8 @@ namespace AibisDream
#endregion
private void Update()
{
if (Input.GetKeyDown(KeyCode.Q) && Input.GetKey(KeyCode.P))
{
_quickTalkButton.SetActive(!_quickTalkButton.activeSelf);
}
}
#region
private void InitQuickTalkButton()
{
_quickTalkButton = transform.Find(QuickTalk).gameObject;
_quickTalkButton.GetComponent<Button>().onClick.AddListener(SwitchQuickTalkMode);
}
private void SwitchQuickTalkMode()
{
DialogController.Instance.quickRunMode = !DialogController.Instance.quickRunMode;
_quickTalkButton.GetComponent<Image>().color =
DialogController.Instance.quickRunMode ? Color.gray : Color.white;
}
/// <summary>
/// 注册对话框
/// </summary>
@@ -215,14 +188,14 @@ namespace AibisDream
DialogRecord.Clear();
}
/// <summary>
/// 切换对话回顾展示状态
/// </summary>
public void ControlDialogHistory()
public void CloseCanvas()
{
var logObj = transform.Find("Dialogue Log").gameObject;
logObj.SetActive(!logObj.activeSelf);
EnumEventSystem.Global.Send(EventEnum.Menu, logObj.activeSelf);
gameObject.SetActive(false);
}
public void OpenCanvas()
{
gameObject.SetActive(true);
}
#endregion
+5
View File
@@ -48,5 +48,10 @@ namespace AibisDream.Framework
{
gameObject.SetActive(false);
}
public void SetMaxCharNum(string value)
{
maxCharNum = int.Parse(value);
}
}
}