本地化
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user