Merge branch '12月版本佩佩优化12.26' into 佩佩merge分支
This commit is contained in:
@@ -12,12 +12,13 @@ namespace AibisDream.FixSystem
|
||||
|
||||
#region 内部索引
|
||||
|
||||
[HideInInspector] public BodyModule[] BodyModules { get; private set; }
|
||||
[HideInInspector] public CableSystem CableSystem { get; private set; }
|
||||
[HideInInspector]public BodyModule[] BodyModules { get; private set; }
|
||||
[HideInInspector]public CableSystem CableSystem { get; private set; }
|
||||
public GameObject bodyModulePrefab;
|
||||
[HideInInspector] public Transform bodyModuleGroup;
|
||||
[HideInInspector] public OscilloscopeSystem oscilloscopeSystem;
|
||||
[HideInInspector] public HeatMapController heatMapController;
|
||||
[HideInInspector]public Transform bodyModuleGroup;
|
||||
[HideInInspector]public OscilloscopeSystem oscilloscopeSystem;
|
||||
[HideInInspector]public HeatMapController heatMapController;
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -39,7 +40,6 @@ namespace AibisDream.FixSystem
|
||||
|
||||
public bool inHotErr;
|
||||
private int heatValue;
|
||||
|
||||
public int HeatValue
|
||||
{
|
||||
get => heatValue;
|
||||
@@ -49,8 +49,7 @@ namespace AibisDream.FixSystem
|
||||
inHotErr = heatValue > 0;
|
||||
}
|
||||
}
|
||||
|
||||
[HideInInspector] public BodyModule curBodyModule;
|
||||
[HideInInspector]public BodyModule curBodyModule;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -68,9 +67,9 @@ namespace AibisDream.FixSystem
|
||||
CableSystem = transform.Find("Cable System").GetComponent<CableSystem>();
|
||||
bodyModuleGroup = transform.Find("Body Module Group");
|
||||
oscilloscopeSystem = transform.Find("Oscilloscope System").GetComponent<OscilloscopeSystem>();
|
||||
if (transform.Find("HeatMapController"))
|
||||
if(transform.Find("HeatMapController"))
|
||||
{
|
||||
heatMapController = transform.Find("HeatMapController").GetComponent<HeatMapController>();
|
||||
heatMapController=transform.Find("HeatMapController").GetComponent<HeatMapController>();
|
||||
}
|
||||
FixSystemCenter.SystemDic.Register(this);
|
||||
}
|
||||
@@ -93,7 +92,6 @@ namespace AibisDream.FixSystem
|
||||
{
|
||||
continue; // 跳过不可用的模块
|
||||
}
|
||||
|
||||
float tempDistance = Vector3.Distance(sourcePos, bodyModule.GetSocketPos());
|
||||
|
||||
if (tempDistance < closestDistance)
|
||||
@@ -115,7 +113,6 @@ namespace AibisDream.FixSystem
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 寻找指定名称的BodyModule
|
||||
/// </summary>
|
||||
@@ -136,56 +133,52 @@ namespace AibisDream.FixSystem
|
||||
CableSystem.curBodyModule.DeepIn();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// 设置死循环状态
|
||||
/// </summary>
|
||||
public void SetModuleState_CantStopRunning(string moduleName, bool state)
|
||||
public void SetModuleState_CantStopRunning(string moduleName,bool state)
|
||||
{
|
||||
BodyModule result = FindBodyModuleByName(moduleName);
|
||||
if (result != null)
|
||||
{
|
||||
Debug.Log("Found module: " + moduleName);
|
||||
result.data.cantStopRunning = state;
|
||||
result.data.cantStopRunning=state;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Module not found.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置发热
|
||||
/// </summary>
|
||||
|
||||
public void SetHeat(int targetHeatValue)
|
||||
{
|
||||
HeatValue = targetHeatValue;
|
||||
|
||||
heatMapController.SetTemptureDirect(HeatValue);
|
||||
HeatValue=targetHeatValue;
|
||||
|
||||
heatMapController.SetTemptureDirect(HeatValue);
|
||||
}
|
||||
|
||||
public void ShowHeatMap()
|
||||
{
|
||||
heatMapController.ShowHeatMap();
|
||||
ResetPlug();
|
||||
}
|
||||
|
||||
public void HideHeatMap()
|
||||
{
|
||||
heatMapController.HideHeatMap();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 冷却后处理
|
||||
/// </summary>
|
||||
public void OnCooling()
|
||||
{
|
||||
if (!inHotErr) return;
|
||||
if (!inHotErr) return;
|
||||
// 系统冷却
|
||||
heatValue = 0;
|
||||
curBodyModule?.ShowWave();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 插头重新插入初始插孔
|
||||
/// </summary>
|
||||
@@ -193,7 +186,6 @@ namespace AibisDream.FixSystem
|
||||
{
|
||||
CableSystem.ResetPlug();
|
||||
}
|
||||
|
||||
#region 数据加载与保存
|
||||
|
||||
public override string[] GetDataKeyOptions()
|
||||
@@ -208,7 +200,7 @@ namespace AibisDream.FixSystem
|
||||
Debug.Log("配置项名称为空");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!ConfigUtil.Instance.TryLoadConfig<BodyModuleSystemData>(DataPath + CurDataKey,
|
||||
out var data))
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@ public class PunchTapeSystem : MonoBehaviour
|
||||
{
|
||||
public RectTransform punchTapeMachine;
|
||||
public RectTransform punchTape;
|
||||
|
||||
public GameObject blackPanel;
|
||||
public float stepInterval = 0.1f; // Interval between each printing step
|
||||
public float stepDistance = 0.5f; // Distance moved per step
|
||||
public float[] stepPatterns = { 0.3f, 0.5f, 0.2f, 0.4f, 0.6f }; // Pattern of intervals to simulate rhythmic printing
|
||||
@@ -18,13 +20,13 @@ public class PunchTapeSystem : MonoBehaviour
|
||||
FixSystemCenter.SystemDic.Register(this);
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.P))
|
||||
{
|
||||
StartPrinting(2);
|
||||
}
|
||||
}
|
||||
// public void Update()
|
||||
// {
|
||||
// if (Input.GetKeyDown(KeyCode.P))
|
||||
// {
|
||||
// StartPrinting(2);
|
||||
// }
|
||||
// }
|
||||
|
||||
public void StartPrinting(int tapeCount)
|
||||
{
|
||||
@@ -33,6 +35,7 @@ public class PunchTapeSystem : MonoBehaviour
|
||||
|
||||
public IEnumerator PrintPunchTapes(int tapeCount)
|
||||
{
|
||||
blackPanel.SetActive(true);
|
||||
Vector3 machineStartPos = punchTapeMachine.anchoredPosition;
|
||||
Vector3 tapeStartPos = punchTape.anchoredPosition;
|
||||
Color tapeStartColor = punchTape.GetComponent<Image>().color;
|
||||
@@ -69,6 +72,7 @@ public class PunchTapeSystem : MonoBehaviour
|
||||
|
||||
// Move the printer back to x = 0 over 1 second
|
||||
yield return punchTapeMachine.DOAnchorPos(new Vector2(-1428.186f, punchTapeMachine.anchoredPosition.y), 1f).WaitForCompletion();
|
||||
blackPanel.SetActive(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user