hot時の温度上昇を追加
This commit is contained in:
parent
b95920754c
commit
afe00bdef7
|
|
@ -2273,6 +2273,7 @@ MonoBehaviour:
|
|||
panFactor: 0.5
|
||||
deadZone: 0.08
|
||||
baseIncreaseSpeed: 0.06
|
||||
hotIncreaseSpeed: 0.09
|
||||
maxDecreaseSpeed: 0.09
|
||||
coldValue: 0.32
|
||||
hotValue: 0.67
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ public class ThermalControl : MonoBehaviour
|
|||
[SerializeField] private float deadZone = .1f;
|
||||
[Header("熱くなるスピード/冷えるスピードの最大値")]
|
||||
[SerializeField] private float baseIncreaseSpeed = .03f;
|
||||
[SerializeField] private float hotIncreaseSpeed = .07f;
|
||||
[SerializeField] private float maxDecreaseSpeed = .03f;
|
||||
[Space]
|
||||
[Header("ゲージ調整")]
|
||||
|
|
@ -30,6 +31,7 @@ public class ThermalControl : MonoBehaviour
|
|||
|
||||
private void Start()
|
||||
{
|
||||
temperature = 0f;
|
||||
thermoMeter.SetScale(coldValue, hotValue);
|
||||
}
|
||||
|
||||
|
|
@ -37,6 +39,7 @@ public class ThermalControl : MonoBehaviour
|
|||
|
||||
private void Update()
|
||||
{
|
||||
var cond = GetCondition();
|
||||
panSpeed = panController.Delta.magnitude * panFactor;
|
||||
if (panSpeed > deadZone)
|
||||
{
|
||||
|
|
@ -44,12 +47,18 @@ public class ThermalControl : MonoBehaviour
|
|||
}
|
||||
else
|
||||
{
|
||||
temperature += baseIncreaseSpeed * Time.deltaTime;
|
||||
if (cond == ThermalCondition.Hot)
|
||||
{
|
||||
temperature += hotIncreaseSpeed * Time.deltaTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
temperature += baseIncreaseSpeed * Time.deltaTime;
|
||||
}
|
||||
}
|
||||
temperature = Mathf.Clamp01(temperature);
|
||||
thermoMeter.SetValue(temperature);
|
||||
|
||||
var cond = GetCondition();
|
||||
if (cond != prevCond)
|
||||
{
|
||||
Debug.Log($"cond :{cond} temp: {temperature}");
|
||||
|
|
@ -57,7 +66,7 @@ public class ThermalControl : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
private ThermalCondition GetCondition()
|
||||
public ThermalCondition GetCondition()
|
||||
{
|
||||
if (temperature <= coldValue)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue