添加指针
This commit is contained in:
@@ -14,7 +14,6 @@ namespace AibisDream.FixSystem
|
||||
|
||||
public Transform socketPos;
|
||||
|
||||
// public Transform _indicatorPos;
|
||||
private BodyModuleSystem _bodyModuleSystem;
|
||||
private Material _highlightMaterial;
|
||||
private Material _alarmMaterial;
|
||||
@@ -59,17 +58,23 @@ namespace AibisDream.FixSystem
|
||||
|
||||
public void PlugIn()
|
||||
{
|
||||
if (DialogController.Instance != null)
|
||||
// 然后触发Yarn节点
|
||||
DialogController.Instance.StartDialogNode(_bodyModuleSystem.inHotErr ? "系统过热" : data.PlugInNodeName);
|
||||
// 插入就在示波器显示图片
|
||||
if (!_bodyModuleSystem.inHotErr)
|
||||
{
|
||||
StartCoroutine(FixSystemCenter.SystemDic.Get<IOscilloscopeSystem>()
|
||||
?.ShowScanImage(data.ScreenPic, data.checkPoints));
|
||||
}
|
||||
|
||||
// 然后触发Yarn节点
|
||||
DialogController.Instance?.StartDialogNode(_bodyModuleSystem.inHotErr ? "系统过热" : data.PlugInNodeName);
|
||||
}
|
||||
|
||||
public void PlugOut()
|
||||
{
|
||||
FixSystemCenter.SystemDic.Get<IOscilloscopeSystem>()?.HideScanImage();
|
||||
|
||||
_bodyModuleSystem.oscilloscopeSystem.MessageBoxSetNull();
|
||||
StartCoroutine(_bodyModuleSystem.oscilloscopeSystem.DisableDeepInButton());
|
||||
|
||||
// TODO 触发Yarn节点(似乎目前没有拔出对话?)
|
||||
}
|
||||
|
||||
public Vector3 GetSocketPos()
|
||||
@@ -133,14 +138,6 @@ namespace AibisDream.FixSystem
|
||||
}
|
||||
}
|
||||
|
||||
// public void HideModule(bool enable)
|
||||
// {
|
||||
// if (targetSpriteRenderer != null && highlightMaterial != null)
|
||||
// {
|
||||
// targetSpriteRenderer.material = enable ? highlightMaterial : originalMaterial;
|
||||
// }
|
||||
// }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -148,7 +145,6 @@ namespace AibisDream.FixSystem
|
||||
public struct BodyModuleData
|
||||
{
|
||||
public const string PlugInNodeTemplate = "{0}PlugIn";
|
||||
public const string DeepInTemplate = "{0}DeepIn";
|
||||
|
||||
// ID
|
||||
public string moduleName;
|
||||
@@ -158,11 +154,14 @@ 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);
|
||||
[JsonIgnore] public string DeepInNodeName => string.Format(DeepInTemplate, moduleName);
|
||||
|
||||
[JsonIgnore]
|
||||
public Sprite ModulePic
|
||||
@@ -171,6 +170,9 @@ namespace AibisDream.FixSystem
|
||||
set => modulePicPath = ResourceKit.SaveSprite(value);
|
||||
}
|
||||
|
||||
public Sprite ScreenPic =>
|
||||
!string.IsNullOrEmpty(showPicPath) ? ResourceKit.LoadSpriteFromPsd(showPicPath) : null;
|
||||
|
||||
[JsonIgnore]
|
||||
public Vector3 ModulePos
|
||||
{
|
||||
@@ -185,4 +187,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user