资源清理

This commit is contained in:
2025-03-21 17:41:58 +08:00
parent a6d5c91907
commit d820084a2e
13 changed files with 3789 additions and 37982 deletions
+15 -13
View File
@@ -513,19 +513,21 @@ MonoBehaviour:
m_PostInfinity: 2
m_RotationOrder: 4
_filter:
- 0.0048309183
- 0.016401261
- 0.04532712
- 0.08293076
- 0.12053438
- 0.14946026
- 0.1610306
- 0.14946026
- 0.12053438
- 0.08293076
- 0.04532712
- 0.016401261
- 0.0048309183
- 0.0041436465
- 0.011565162
- 0.030704863
- 0.05687546
- 0.08538971
- 0.11156032
- 0.13070002
- 0.13812155
- 0.13070002
- 0.11156032
- 0.08538971
- 0.05687546
- 0.030704863
- 0.011565162
- 0.0041436465
--- !u!114 &-6086986437317696584
MonoBehaviour:
m_ObjectHideFlags: 3
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -10030,7 +10030,7 @@ MonoBehaviour:
- {fileID: 11400000, guid: e749fe0f9aa32f44097e037f52a5bfe0, type: 2}
- {fileID: 11400000, guid: 7bf300be492f2634580f0eaabcca2b2e, type: 2}
- {fileID: 11400000, guid: 088974ca6c9487041b695af86b6c93a1, type: 2}
runMode: 2
runMode: 0
firstTalkSo: {fileID: 11400000, guid: ac5ca9a66ff22ab4b9cd5adbdade6b8c, type: 2}
testTalkSo: {fileID: 11400000, guid: 10601ce26230723479d875a630f15732, type: 2}
saveFileName: "PeipeiDay2_\u505C\u6B62\u60F3\u8C61"
File diff suppressed because it is too large Load Diff
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
[RequireComponent(typeof(LineRenderer))]
public class PhysicLineSegment : MonoBehaviour
@@ -59,13 +59,6 @@ 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);
@@ -73,12 +66,6 @@ namespace AibisDream.FixSystem
public void PlugOut()
{
FixSystemCenter.SystemDic.Get<IOscilloscopeSystem>()?.HideScanImage();
_bodyModuleSystem.oscilloscopeSystem.MessageBoxSetNull();
StartCoroutine(_bodyModuleSystem.oscilloscopeSystem.DisableDeepInButton());
// TODO 触发Yarn节点(似乎目前没有拔出对话?)
}
public void DeepIn()
@@ -169,7 +156,6 @@ namespace AibisDream.FixSystem
[Header("功能参数")] public bool cantStopRunning;
public string showPicPath;
public CheckPoint[] checkPoints;
// 只读
[JsonIgnore] public string PlugInNodeName => string.Format(PlugInNodeTemplate, moduleName);
@@ -200,18 +186,4 @@ 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);
}
}
}
@@ -17,7 +17,6 @@ namespace AibisDream.FixSystem
public CableSystem CableSystem { get; private set; }
public GameObject bodyModulePrefab;
[HideInInspector] public Transform bodyModuleGroup;
[HideInInspector] public OscilloscopeSystem oscilloscopeSystem;
[HideInInspector] public HeatMapController heatMapController;
#endregion
@@ -60,7 +59,6 @@ namespace AibisDream.FixSystem
BodyModules = transform.GetComponentsInChildren<BodyModule>().ToList();
CableSystem = transform.Find("Cable System").GetComponent<CableSystem>();
bodyModuleGroup = transform.Find("Body Module Group");
oscilloscopeSystem = transform.Find("Oscilloscope System").GetComponent<OscilloscopeSystem>();
if (transform.Find("HeatMapController"))
{
heatMapController = transform.Find("HeatMapController").GetComponent<HeatMapController>();
@@ -7,9 +7,6 @@ namespace AibisDream
public static class BodyModuleYarnCommand
{
private static BodyModuleSystem BodyModuleSystem => FixSystemCenter.SystemDic.Get<BodyModuleSystem>();
private static OscilloscopeSystem OscilloscopeSystem => FixSystemCenter.SystemDic.Get<OscilloscopeSystem>();
private static PunchTapeSystem PunchTapeSystem => FixSystemCenter.SystemDic.Get<PunchTapeSystem>();
[YarnCommand("SetModuleState_CantStopRunning")]
@@ -42,12 +39,12 @@ namespace AibisDream
var _UFModule = BodyModuleSystem.FindBodyModuleByName("UF").transform.GetComponent<UFModule>();
_UFModule.RemoveUFModule();
BodyModuleSystem.FindBodyModuleByName("UF").SetSocketAvailable(false);
}
[YarnCommand("Temp_RemoveUFCover")]
public static void Temp_RemoveUFCover()
{ BodyModuleSystem.CableSystem.ResetPlug();
{
BodyModuleSystem.CableSystem.ResetPlug();
var _UFModule = BodyModuleSystem.FindBodyModuleByName("UF").transform.GetComponent<UFModule>();
_UFModule.RemoveUFCover();
}
@@ -70,7 +67,7 @@ namespace AibisDream
[YarnCommand("Temp_InstallChip")]
public static void Temp_InstallChip()
{
var _chipModule = BodyModuleSystem.FindBodyModuleByName("Color").transform.GetComponent<ChipModule>();
var _chipModule = BodyModuleSystem.FindBodyModuleByName("Color").transform.GetComponent<ChipModule>();
_chipModule.InstallChipModule();
}
@@ -80,10 +77,11 @@ namespace AibisDream
var _chipModule = BodyModuleSystem.FindBodyModuleByName("Color").transform.GetComponent<ChipModule>();
_chipModule.RemoveChipModule();
}
[YarnCommand("Temp_InstallUFColor")]
public static void Temp_InstallUFChip()
{
var _chipModule = BodyModuleSystem.FindBodyModuleByName("UF").transform.GetComponent<UFModule>();
var _chipModule = BodyModuleSystem.FindBodyModuleByName("UF").transform.GetComponent<UFModule>();
_chipModule.InstallUFColor();
}
@@ -115,70 +113,10 @@ namespace AibisDream
targetModule.Alarm(enable);
}
[YarnCommand("MessageBoxSetError")]
public static void MessageBoxSetError()
{
OscilloscopeSystem.MessageBoxSetError();
}
[YarnCommand("MessageBoxSetWarning")]
public static void MessageBoxSetWarning()
{
OscilloscopeSystem.MessageBoxSetWarning();
}
[YarnCommand("MessageBoxSetNormal")]
public static void MessageBoxSetNormal()
{
OscilloscopeSystem.MessageBoxSetNormal();
}
[YarnCommand("MessageBoxSetChecking")]
public static void MessageBoxSetChecking()
{
OscilloscopeSystem.MessageBoxSetChecking();
}
[YarnCommand("MessageBoxSetNull")]
public static void MessageBoxSetNull()
{
OscilloscopeSystem.MessageBoxSetNull();
}
[YarnCommand("MessageBoxSetText")]
public static void MessageBoxSetText(string text)
{
OscilloscopeSystem.MessageBoxSetText(text);
}
[YarnCommand("EnableDeepInButton")]
public static void EnableDeepInButton()
{
OscilloscopeSystem.StartCoroutine(OscilloscopeSystem.EnableDeepInButton());
}
[YarnCommand("DisableDeepInButton")]
public static void DisableDeepInButton()
{
OscilloscopeSystem.StartCoroutine(OscilloscopeSystem.DisableDeepInButton());
}
[YarnCommand("PrintPunchTapes")]
public static IEnumerator PrintPunchTapes(int count)
{
yield return PunchTapeSystem.StartCoroutine(PunchTapeSystem.PrintPunchTapes(count));
}
[YarnCommand("HidePunchTapeGroup")]
public static IEnumerator HidePunchTapeGroup()
{
yield return PunchTapeSystem.StartCoroutine(PunchTapeSystem.Temp_HidePunchTapeGroup());
}
[YarnCommand("ShowPunchTapeGroup")]
public static void ShowPunchTapeGroup()
{
PunchTapeSystem.Temp_showPunchTapeGroup();
}
}
}
@@ -1,148 +0,0 @@
using TMPro;
using UnityEngine;
using DG.Tweening;
using System.Collections;
using Yarn.Unity;
namespace AibisDream.FixSystem
{
public class OscilloscopeSystem : MonoBehaviour
{
#region
private TMP_Text _state; // 显示状态的TextMeshPro组件
private TMP_Text _screenText; // 显示消息的TextMeshPro组件
private SpriteButton _deepinButton;
#endregion
private void Awake()
{
FixSystemCenter.SystemDic.Register(this);
InitComponentRefs();
}
private void InitComponentRefs()
{
_screenText = transform.Find("Screen Text").GetComponent<TMP_Text>();
_state = transform.Find("Screen State Text").GetComponent<TMP_Text>();
_deepinButton = new SpriteButton(transform.Find("Deepin Button").gameObject, false);
MessageBoxSetNull();
_deepinButton.OnButtonDown += HandleDeepInButtonClick;
}
private void Update()
{
_deepinButton.CheckButtonClick();
}
#region
public void MessageBoxSetError()
{
_state.text = "错误";
_state.color = Color.red; // 红色
}
private void HandleDeepInButtonClick()
{
FixSystemCenter.SystemDic.Get<BodyModuleSystem>().HandleDeepIn();
}
public void MessageBoxSetWarning()
{
_state.text = "警告";
_state.color = new Color(1.0f, 0.55f, 0.0f); // 琥珀色
}
public void MessageBoxSetNormal()
{
_state.text = "正常";
_state.color = Color.blue; // 琥珀色
}
public void MessageBoxSetChecking()
{
_state.text = "检查中";
_state.color = Color.white; // 琥珀色
}
public void MessageBoxSetText(string text)
{
_screenText.color = Color.white; // 默认文本颜色
_screenText.text += text + "<br>";
}
public void MessageBoxSetNull()
{
_state.text = "未检测到信号";
_state.color = Color.white; // 蓝色
_screenText.text = "";
_screenText.color = Color.white; // 默认文本颜色
}
public IEnumerator EnableDeepInButton()
{
yield return _deepinButton.GetTransform().DOLocalMoveX(0.35f, 0.5f).WaitForCompletion();
_deepinButton.SetActive(true);
}
public IEnumerator DisableDeepInButton()
{
yield return _deepinButton.GetTransform().DOLocalMoveX(-0.2f, 0.5f).WaitForCompletion();
_deepinButton.SetActive(false);
}
#endregion
}
/// <summary>
/// 示波器接口。暂时能想到的就是这几个对外接口
/// 用示波器显示对话的部分额外实现IDialogView接口。这部分方案定下来之后老丁来实现。
/// </summary>
public interface IOscilloscopeSystem
{
/// <summary>
/// 展示示波器上的图片和检测点位
/// </summary>
/// /// <param name="moduleImage">显示在示波器里的图片</param>
/// <param name="checkPoints">检查点信息</param>
public IEnumerator ShowScanImage(Sprite moduleImage, CheckPoint[] checkPoints);
/// <summary>
/// 聚焦到某个点上
/// </summary>
/// <param name="checkPointId">检查点</param>
public IEnumerator FocusOnPoint(string checkPointId);
/// <summary>
/// 停止聚焦
/// </summary>
/// <returns></returns>
public IEnumerator StopFocus();
/// <summary>
/// 隐藏显示屏上的图像
/// </summary>
/// <returns></returns>
public void HideScanImage();
}
public static class OscilloscopeYarnCommand
{
private static IOscilloscopeSystem OscilloscopeSystem => FixSystemCenter.SystemDic.Get<IOscilloscopeSystem>();
[YarnCommand("focus_on_point")]
public static IEnumerator FocusOnPoint(string checkPointId)
{
return OscilloscopeSystem?.FocusOnPoint(checkPointId);
}
[YarnCommand("stop_focus")]
public static IEnumerator StopFocus()
{
return OscilloscopeSystem?.StopFocus();
}
}
}
@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: a2e20b111511460a8f3a151bd470da9d
timeCreated: 1731328037
@@ -1,3 +1,4 @@
using System;
using System.Collections;
using DG.Tweening;
using UnityEngine;
@@ -16,13 +17,16 @@ public class PunchTapeSystem : MonoBehaviour
public float[]
stepPatterns = { 0.3f, 0.5f, 0.2f, 0.4f, 0.6f }; // Pattern of intervals to simulate rhythmic printing
public GameObject tempPunchTapeGroup;
private void Awake()
{
FixSystemCenter.SystemDic.Register(this);
}
private void OnDestroy()
{
FixSystemCenter.SystemDic.Unregister<PunchTapeSystem>();
}
public IEnumerator PrintPunchTapes(int tapeCount)
{
blackPanel.SetActive(true);
@@ -66,20 +70,4 @@ public class PunchTapeSystem : MonoBehaviour
.WaitForCompletion();
blackPanel.SetActive(false);
}
public void Temp_showPunchTapeGroup()
{
tempPunchTapeGroup.SetActive(true);
}
public IEnumerator Temp_HidePunchTapeGroup()
{
foreach (SpriteRenderer s in tempPunchTapeGroup.GetComponentsInChildren<SpriteRenderer>())
{
s.DOFade(0, 0.5f);
}
yield return new WaitForSeconds(0.5f);
tempPunchTapeGroup.SetActive(false);
}
}
+19 -50
View File
@@ -14,19 +14,19 @@ using AibisDream.Kit;
public class EyeSystem : MonoBehaviour
{
[SerializeField] private List<EyeTarget> targets = new List<EyeTarget>(); // 保存目标列表
[SerializeField] private List<EyeTarget> targets = new(); // 保存目标列表
public List<EyeTarget> Targets => targets; // 提供目标列表的公共访问
private EyeTarget currentTarget; // 当前选中的目标
public EyeTarget CurrentTarget => currentTarget; // 提供当前目标的公共访问
public RawImage eyeImage;
public Image memoryRender;
public Button backToFaceButton;
public GameObject eyeView;
public ViewCameraManager cameraManager;
private IEyeStateEffect eyeStateEffect;
private EyeData _eyeData=new ();
private EyeData _eyeData = new();
private Tween hsvShiftTween;
private MouseFollowAndZoom mouseFollowAndZoom;
private void Awake()
{
Init();
@@ -39,14 +39,14 @@ public class EyeSystem : MonoBehaviour
var virtualCamDeep = transform.Find("Eye DeepCamera").GetComponent<ICinemachineCamera>();
CameraKit.Instance.RegisterCamera(CameraEnum.Eye, virtualCam);
CameraKit.Instance.RegisterCamera(CameraEnum.EyeDeep, virtualCamDeep);
GameLoopManager.FixDataContainer.Register(_eyeData);
GameLoopManager.FixDataContainer.Register(_eyeData);
// 添加加载逻辑
_eyeData.LoadEvent += LoadData;
}
private void LoadData(EyeData eyedata)
private void LoadData(EyeData eyedata)
{
SetEyeColorState(eyedata.currentState);
}
public void OnEnter()
@@ -76,10 +76,11 @@ public class EyeSystem : MonoBehaviour
public void OnExit()
{
if(currentTarget!=null)
if (currentTarget != null)
{
eyeStateEffect?.CleanupEffect(CurrentTarget);
}
mouseFollowAndZoom.SetIsActive(false);
currentTarget = null;
CloseEyeView();
@@ -90,21 +91,10 @@ public class EyeSystem : MonoBehaviour
private void Start()
{
SetEyeColorState(_eyeData.currentState);
if (targets.Count > 0)
{
//SetInitialTargetState(targets[1]);
}
mouseFollowAndZoom = FindObjectOfType<MouseFollowAndZoom>();
}
public void SetInitialTargetState(EyeTarget target)
{
currentTarget = target;
eyeStateEffect?.InitializeEffect(target, cameraManager);
}
public EyeTarget FindEyeTargetByName(string name)
{
return Targets.FirstOrDefault(target => target.gameObject.name == name);
@@ -112,15 +102,13 @@ public class EyeSystem : MonoBehaviour
public void SetTarget(EyeTarget newTarget)
{
// if (newTarget != currentTarget)
// {
if (newTarget == null)
{
Debug.LogError("Target is null in SetTarget");
return;
}
StartCoroutine(SetTargetCoroutine(newTarget.gameObject.name));
// }
}
[YarnCommand("set_Eyetarget")]
@@ -134,14 +122,8 @@ public class EyeSystem : MonoBehaviour
yield break;
}
// if (currentTarget == target)
// {
// DialogController.Instance.SetVariable("$currentEyeTarget",target.name);
// yield break;
// }
DialogController.Instance.SetVariable("$currentEyeTarget", target.name);
StartCoroutine(EyeEffectFadeOut());
float duration = eyeStateEffect.TransitionDuration;
if (target.targetTransform != null)
{
@@ -152,22 +134,21 @@ public class EyeSystem : MonoBehaviour
cameraManager.MoveCameraTo(target.transform, 1f);
}
if(currentTarget!=null)
if (currentTarget != null)
{
currentTarget.BlurIn(eyeStateEffect.TransitionDuration, false);
}
//yield return new WaitForSeconds(eyeStateEffect.TransitionDuration);
if (currentTarget == target)
{
DialogController.Instance.StartDialogNode("重复看同一个目标");
currentTarget = target;
if (currentTarget == target)
{
DialogController.Instance.StartDialogNode("重复看同一个目标");
currentTarget = target;
mouseFollowAndZoom.SetIndicatorTarget(currentTarget);
currentTarget.BlurOut(eyeStateEffect.TransitionDuration, false);
currentTarget.BlurOut(eyeStateEffect.TransitionDuration, false);
yield return new WaitForSeconds(eyeStateEffect.TransitionDuration);
yield break;
}
}
currentTarget = target;
mouseFollowAndZoom.SetIndicatorTarget(currentTarget);
currentTarget.BlurOut(eyeStateEffect.TransitionDuration, false);
@@ -178,9 +159,6 @@ public class EyeSystem : MonoBehaviour
{
DialogController.Instance.StartDialogNode("IntoEyeView");
}
//mouseFollowAndZoom.SetIsActive(true);
}
[YarnCommand("Set_MouseMovementLockState")]
@@ -189,7 +167,6 @@ public class EyeSystem : MonoBehaviour
mouseFollowAndZoom.SetIsLock(isActive);
}
[YarnCommand("EyeEffect_FadeIn")]
public IEnumerator EyeEffectFadeIn()
{
@@ -257,7 +234,7 @@ public class EyeSystem : MonoBehaviour
private void SetEyeColorState(EyeData.EyeColorState state)
{
_eyeData.currentState=state;
_eyeData.currentState = state;
switch (state)
{
case EyeData.EyeColorState.CanImagineColor:
@@ -467,16 +444,8 @@ public class EyeSystem : MonoBehaviour
// 切换到 CanImagineColorEffect 状态
}
public void LostColor()
{
// 对目标列表中的每个目标执行 ColorBack 方法
foreach (EyeTarget target in targets)
{
target.ColorLost();
}
}
}
public class EyeData : IData
{
public enum EyeColorState