Day1Day2重构基本完成
This commit is contained in:
@@ -17,6 +17,8 @@ public class HeatMapController : MonoBehaviour
|
||||
|
||||
private BodyModuleSystem bodyModuleSystem;
|
||||
|
||||
public GameObject heatmapGameobject;
|
||||
|
||||
[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
|
||||
@@ -51,17 +53,27 @@ public class HeatMapController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowHeatMap()
|
||||
{
|
||||
heatmapGameobject.SetActive(true);
|
||||
heatmapGameobject.GetComponent<DraggableUI>().isDone = false;
|
||||
}
|
||||
public void HideHeatMap()
|
||||
{
|
||||
heatmapGameobject.SetActive(false);
|
||||
}
|
||||
|
||||
public void StartCooling()
|
||||
{
|
||||
StartCoroutine(ReduceValueCoroutine());
|
||||
; }
|
||||
}
|
||||
|
||||
IEnumerator ReduceValueCoroutine()
|
||||
{
|
||||
if (Tempture>=2)
|
||||
{
|
||||
Debug.Log("降温失败");
|
||||
GetComponent<DraggableUI>().isDone = true;
|
||||
heatmapGameobject.GetComponent<DraggableUI>().isDone = true;
|
||||
yield return new WaitForSeconds(1);
|
||||
if(DialogController.Instance!=null)
|
||||
DialogController.Instance.StartDialogNode("降温失败");
|
||||
@@ -70,7 +82,7 @@ public class HeatMapController : MonoBehaviour
|
||||
else
|
||||
{
|
||||
Debug.Log("降温成功");
|
||||
GetComponent<DraggableUI>().isDone = true;
|
||||
heatmapGameobject.GetComponent<DraggableUI>().isDone = true;
|
||||
float duration = 2f;
|
||||
SetTemptureSmooth(0,duration);
|
||||
yield return new WaitForSeconds(duration);
|
||||
|
||||
Reference in New Issue
Block a user