This commit is contained in:
2025-01-15 14:17:35 +08:00
parent b1167c81b1
commit 13bf57e84a
6 changed files with 37 additions and 17 deletions
@@ -59,6 +59,13 @@ namespace AibisDream.FixSystem
public void PlugIn()
{
// 插入就在示波器显示图片
if (!_bodyModuleSystem.inHotErr)
{
StartCoroutine(FixSystemCenter.SystemDic.Get<IOscilloscopeSystem>()
?.ShowScanImage(data.ScreenPic, data.checkPoints));
}
if (DialogController.Instance)
// 然后触发Yarn节点
DialogController.Instance.StartDialogNode(_bodyModuleSystem.inHotErr ? "系统过热" : data.PlugInNodeName);
@@ -66,6 +73,8 @@ namespace AibisDream.FixSystem
public void PlugOut()
{
FixSystemCenter.SystemDic.Get<IOscilloscopeSystem>()?.HideScanImage();
_bodyModuleSystem.oscilloscopeSystem.MessageBoxSetNull();
StartCoroutine(_bodyModuleSystem.oscilloscopeSystem.DisableDeepInButton());
@@ -78,8 +87,6 @@ namespace AibisDream.FixSystem
DialogController.Instance.StartDialogNode(data.DeepInNodeName);
}
public Vector3 GetSocketPos()
{
return socketPos.position;
@@ -141,14 +148,6 @@ namespace AibisDream.FixSystem
}
}
// public void HideModule(bool enable)
// {
// if (targetSpriteRenderer != null && highlightMaterial != null)
// {
// targetSpriteRenderer.material = enable ? highlightMaterial : originalMaterial;
// }
// }
#endregion
}
@@ -166,7 +165,11 @@ namespace AibisDream.FixSystem
public SerializableVector3 modulePos;
public SerializableVector3 socketPos;
public bool cantStopRunning;
// 功能信息
[Header("功能参数")] public bool cantStopRunning;
public string showPicPath;
public CheckPoint[] checkPoints;
// 只读
[JsonIgnore] public string PlugInNodeName => string.Format(PlugInNodeTemplate, moduleName);
@@ -178,6 +181,10 @@ namespace AibisDream.FixSystem
get => !string.IsNullOrEmpty(modulePicPath) ? ResourceKit.LoadSpriteFromPsd(modulePicPath) : null;
set => modulePicPath = ResourceKit.SaveSprite(value);
}
[JsonIgnore]
public Sprite ScreenPic =>
!string.IsNullOrEmpty(showPicPath) ? ResourceKit.LoadSpriteFromPsd(showPicPath) : null;
[JsonIgnore]
public Vector3 ModulePos
@@ -193,4 +200,18 @@ namespace AibisDream.FixSystem
set => socketPos = new SerializableVector3(value);
}
}
[Serializable]
public struct CheckPoint
{
public string id;
private SerializableVector3 _serializablePos3;
[JsonIgnore]
public Vector3 PointPos
{
get => _serializablePos3.ToVector3();
set => _serializablePos3 = new SerializableVector3(value);
}
}
}