feat(fix-system): 整合维修面板灯光系统并重构面板结构
Made-with: Cursor
This commit is contained in:
@@ -11,14 +11,21 @@ namespace AibisDream.FixSystem
|
||||
[SerializeField] private TMP_Text title;
|
||||
[SerializeField] private TerminalText logText;
|
||||
|
||||
private void OnEnable()
|
||||
private void Awake()
|
||||
{
|
||||
EnumEventSystem.Global.Register<ScreenEventEnum, GameObject>(ScreenEventEnum.Selected, OnSelected);
|
||||
EnumEventSystem.Global.Register(EventEnum.PlugOut, ClearScreen);
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
private void OnDestroy()
|
||||
{
|
||||
EnumEventSystem.Global.UnRegister(EventEnum.PlugOut, ClearScreen);
|
||||
EnumEventSystem.Global.UnRegister(ScreenEventEnum.Selected);
|
||||
EnumEventSystem.Global.UnRegister(EventEnum.PlugOut);
|
||||
}
|
||||
|
||||
private void OnSelected(GameObject obj)
|
||||
{
|
||||
gameObject.SetActive(obj == gameObject);
|
||||
}
|
||||
|
||||
// ---------------------- 对话框功能 ----------------------
|
||||
@@ -26,6 +33,8 @@ namespace AibisDream.FixSystem
|
||||
{
|
||||
if (logText != null)
|
||||
{
|
||||
EnumEventSystem.Global.Send(ScreenEventEnum.Selected, gameObject);
|
||||
|
||||
logText.OnTextShown += () => token.TextShown();
|
||||
|
||||
title.text = token.lineInfo.character.GetActorName();
|
||||
|
||||
Reference in New Issue
Block a user