Ver.0.3.0.33

This commit is contained in:
2025-07-08 08:32:46 +00:00
parent 99f4dd67c2
commit 0ad5e29917
6831 changed files with 695623 additions and 234455 deletions
@@ -72,7 +72,6 @@ public class HeatMapController : MonoBehaviour
heatmapGameobject.transform.localPosition = outPos;
heatmapGameobject.SetActive(true);
heatmapGameobject.transform.DOLocalMove(inPos, 1f);
heatmapGameobject.GetComponent<DraggableUI>().isDone = false;
yield return new WaitForSeconds(1f); // 等待动画完成
heatmapGameobject.GetComponent<DraggableUI>().UnlockDrag();
coolingButton.interactable = false;
@@ -81,8 +80,8 @@ public class HeatMapController : MonoBehaviour
public void HideHeatMap()
{
var draggableUI = heatmapGameobject.GetComponent<DraggableUI>();
heatmapGameobject.transform.DOLocalMove(outPos, 1f).OnComplete(() => { draggableUI.UnlockDrag(); });
heatmapGameobject.SetActive(false);
heatmapGameobject.transform.DOLocalMove(outPos, 1f).OnComplete(() => { draggableUI.UnlockDrag(); heatmapGameobject.SetActive(false);});
}
public void StartCooling()
@@ -146,7 +145,11 @@ public class HeatMapController : MonoBehaviour
public void SetDataToMaterial()
{
if (tempture >= 0 && tempture <= 1)
if (tempture == 0)
{
uftempture = 0.5f;
}
else if (tempture >= 0 && tempture <= 1)
{
uftempture = Mathf.Lerp(1.5f, 2.8f, tempture); // 线性插值
modulesTempture = Mathf.Lerp(1.5f, 1.8f, tempture);
@@ -207,9 +210,4 @@ public class HeatMapController : MonoBehaviour
{
DOTween.To(() => tempture, x => Tempture = x, targetValue, duration);
}
float Map(float value, float minSource, float maxSource, float minTarget, float maxTarget)
{
return minTarget + (value - minSource) * (maxTarget - minTarget) / (maxSource - minSource);
}
}