diff --git a/Assets/Resources/Prefabs/Fix/Body Module System.prefab b/Assets/Resources/Prefabs/Fix/Body Module System.prefab index d0bebab91..f410b0604 100644 --- a/Assets/Resources/Prefabs/Fix/Body Module System.prefab +++ b/Assets/Resources/Prefabs/Fix/Body Module System.prefab @@ -1972,7 +1972,7 @@ LineRenderer: - {x: 0, y: -1.15, z: 0} m_Parameters: serializedVersion: 3 - widthMultiplier: 0.5 + widthMultiplier: 2 widthCurve: serializedVersion: 2 m_Curve: diff --git a/Assets/Scenes/PeipeiFixScene.unity b/Assets/Scenes/PeipeiFixScene.unity index cb9f33cfd..1bc841736 100644 --- a/Assets/Scenes/PeipeiFixScene.unity +++ b/Assets/Scenes/PeipeiFixScene.unity @@ -645,7 +645,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!114 &145509953 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1628,7 +1628,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &794854074 RectTransform: m_ObjectHideFlags: 0 @@ -1647,7 +1647,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -2.48, y: 2.34} + m_AnchoredPosition: {x: -2.48, y: -3.58} m_SizeDelta: {x: 2.5, y: 2.5} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &794854075 @@ -2046,9 +2046,9 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 0} - m_TargetAssemblyTypeName: OscilloscopeController, Assembly-CSharp - m_MethodName: StartReduceHeat + - m_Target: {fileID: 632022512} + m_TargetAssemblyTypeName: HeatMapController, Assembly-CSharp + m_MethodName: StartCooling m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} @@ -2106,7 +2106,6 @@ GameObject: m_Component: - component: {fileID: 1163522825} - component: {fileID: 1163522829} - - component: {fileID: 1163522828} - component: {fileID: 1163522827} - component: {fileID: 1163522826} m_Layer: 0 @@ -2173,27 +2172,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1163522824} m_CullTransparentMesh: 1 ---- !u!114 &1163522828 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1163522824} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d94eea8348f54dc49a91c2580c76eb8c, type: 3} - m_Name: - m_EditorClassIdentifier: - heatMaterial: {fileID: 2100000, guid: 72b0010e1307b614ebb427b0d8dc54ee, type: 2} - Pos: - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} --- !u!212 &1163522829 SpriteRenderer: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/FixSystem/HeatMap/HeatMapController.cs b/Assets/Scripts/FixSystem/HeatMap/HeatMapController.cs index e89dcbdd7..8111090f4 100644 --- a/Assets/Scripts/FixSystem/HeatMap/HeatMapController.cs +++ b/Assets/Scripts/FixSystem/HeatMap/HeatMapController.cs @@ -4,6 +4,10 @@ using UnityEngine; using UnityEngine.UI; using Yarn.Unity; using DG.Tweening; +using System.Collections.Generic; +using System.Collections; +using AibisDream; +using AibisDream.FixSystem; public class HeatMapController : MonoBehaviour { @@ -11,6 +15,8 @@ public class HeatMapController : MonoBehaviour public Transform[] Pos; + private BodyModuleSystem bodyModuleSystem; + [HideInInspector] private Vector4[] points = new Vector4[7]; // 存储6个点的数组,(x, y, z) = center, w = temperature [HideInInspector] private Vector4[] properties = new Vector4[7]; // 存储6个盒子大小的数组, (x,y) = boxsize @@ -45,9 +51,37 @@ public class HeatMapController : MonoBehaviour } } + public void StartCooling() + { + StartCoroutine(ReduceValueCoroutine()); +; } + IEnumerator ReduceValueCoroutine() + { + if (Tempture>=2) + { + Debug.Log("降温失败"); + GetComponent().isDone = true; + yield return new WaitForSeconds(1); + if(DialogController.Instance!=null) + DialogController.Instance.StartDialogNode("降温失败"); + yield break; + } + else + { + Debug.Log("降温成功"); + GetComponent().isDone = true; + float duration = 2f; + SetTemptureSmooth(0,duration); + yield return new WaitForSeconds(duration); + DialogController.Instance.StartDialogNode("降温成功"); + bodyModuleSystem.OnCooling(); + Debug.Log("Value has reached zero."); + } + } void Start() { + bodyModuleSystem=FindObjectOfType(); // // 初始调用,设置初始位置 //tempture=1; // // 初始化数据,这里是示例,你可以根据实际需求设置 diff --git a/Assets/Scripts/FixSystemNew/BodyModuleSystem.cs b/Assets/Scripts/FixSystemNew/BodyModuleSystem.cs index bdf46af17..1cf132382 100644 --- a/Assets/Scripts/FixSystemNew/BodyModuleSystem.cs +++ b/Assets/Scripts/FixSystemNew/BodyModuleSystem.cs @@ -37,7 +37,7 @@ namespace AibisDream.FixSystem #region 系统状态 - [HideInInspector]public bool inHotErr; + public bool inHotErr; [HideInInspector]public BodyModule curBodyModule; #endregion