Merge branch '12月版本佩佩优化12.26' into 佩佩merge分支

This commit is contained in:
2024-12-27 01:50:12 +08:00
42 changed files with 7561 additions and 5778 deletions
@@ -133,7 +133,7 @@ public class HeatMapController : MonoBehaviour
for (int i = 0; i < 7; i++)
{
//RectTransform transform=Pos[i].GetComponent<RectTransform>();
Transform transform=Pos[i].GetComponent<Transform>();
Transform currentTransform=Pos[i].GetComponent<Transform>();
Debug.Log($"Point {i}: {points[i]}");
if (i == 0)
@@ -149,7 +149,7 @@ public class HeatMapController : MonoBehaviour
points[i] = new Vector4(Pos[i].position.x, Pos[i].position.y, modulesTempture, 0); // (x, y, z, temperature)
}
Sprite currentSprite=transform.GetComponent<SpriteRenderer>().sprite;
Sprite currentSprite=currentTransform.GetComponent<SpriteRenderer>().sprite;
properties[i] = new Vector4(currentSprite.bounds.size.x, currentSprite.bounds.size.y, 0.0f, 0.0f); // (boxsize x, boxsize y, unused, unused)
Debug.Log($"Point {i}: {currentSprite.bounds.size.x}");
//properties[i] = new Vector4(transform.rect.width*1, transform.rect.height*1, 0.0f, 0.0f); // (boxsize x, boxsize y, unused, unused)
@@ -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);
}
}
@@ -246,8 +246,8 @@ namespace AibisDream.FixSystem
var memorySystem = FixSystemCenter.SystemDic.Get<MemoryProcess>();
yield return MainUIController.Instance.FadeInSync(Duration/2);
memorySystem.OnExit();
memorySystem.CloseMemoryView();
// 相机还原
var cameraSq = CameraKit.Instance.ReturnInitCamera(Duration);
yield return new WaitForSeconds(Duration/2);
@@ -258,7 +258,7 @@ namespace AibisDream.FixSystem
{
yield return null;
}
memorySystem.OnExit();
}
public void SetArgs(string arg)