合并
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ using AibisDream.Framework;
|
||||
using AibisDream.Kit;
|
||||
using Cinemachine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace AibisDream.FixSystem
|
||||
{
|
||||
|
||||
@@ -23,7 +23,8 @@ namespace AibisDream.FixSystem
|
||||
public bool isActive = true;
|
||||
|
||||
[HideInInspector] public ISocket curSocket;
|
||||
|
||||
[HideInInspector] public BodyModule curBodyModule;
|
||||
|
||||
#endregion
|
||||
|
||||
private void Awake()
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace AibisDream.FixSystem
|
||||
/// 隐藏显示屏上的图像
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IEnumerator HideScanImage();
|
||||
public void HideScanImage();
|
||||
}
|
||||
|
||||
public static class OscilloscopeYarnCommand
|
||||
|
||||
@@ -64,6 +64,7 @@ namespace AibisDream.FixSystem
|
||||
{
|
||||
// 插入模块时触发插入事件
|
||||
EnumEventSystem.Global.Send(EventEnum.PlugIn);
|
||||
_cableSystem.curBodyModule = bodyModule;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +84,7 @@ namespace AibisDream.FixSystem
|
||||
{
|
||||
// 从模块拔出时触发事件
|
||||
EnumEventSystem.Global.Send(EventEnum.PlugOut);
|
||||
_cableSystem.curBodyModule = null;
|
||||
}
|
||||
|
||||
_cableSystem.curSocket = null;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using AibisDream.FixSystem;
|
||||
using AibisDream.Kit;
|
||||
using Cinemachine;
|
||||
@@ -35,8 +34,6 @@ namespace AibisDream.Framework
|
||||
public float initOrthoSize;
|
||||
}
|
||||
|
||||
public Camera uiCamera;
|
||||
|
||||
#endregion
|
||||
|
||||
private CameraKit()
|
||||
|
||||
Reference in New Issue
Block a user