This commit is contained in:
2024-11-15 01:24:07 +08:00
parent fccc58f5b9
commit db5b4fc2ed
23 changed files with 606 additions and 399 deletions
@@ -1,4 +1,5 @@
using UnityEngine;
using TMPro;
using UnityEngine;
namespace AibisDream.FixSystem
{
@@ -6,26 +7,42 @@ namespace AibisDream.FixSystem
{
#region
private OscilloscopeViewer _oscilloscopeViewer;
private BodyModuleSystem _bodyModuleSystem;
private TMP_Text _screenText;
#endregion
public void InitComponentRefs()
private void Awake()
{
_oscilloscopeViewer = transform.Find("Oscilloscope Viewer").GetComponent<OscilloscopeViewer>();
InitComponentRefs();
}
public void DeepIn()
private void InitComponentRefs()
{
// 插线系统不正常就返回
if (!_bodyModuleSystem.IsPlugInSocket())
{
_oscilloscopeViewer.ShowScreenMessage("未插入任何目标模块");
return;
}
_screenText = transform.Find("Screen Text").GetComponent<TMP_Text>();
//
// TODO 回头找个IOC容器一起管
_bodyModuleSystem = FindObjectOfType<BodyModuleSystem>();
_screenText.text = "";
}
/// <summary>
/// 显示消息
/// </summary>
/// <param name="message"></param>
public void ShowScreenMessage(string message)
{
_screenText.text = message;
}
/// <summary>
/// 清除消息
/// </summary>
public void ClearScreenMessage()
{
_screenText.text = "";
}
}
}