diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Corn.cs b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Corn.cs index fe1032a0..55887797 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Corn.cs +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Corn.cs @@ -146,8 +146,8 @@ public class Corn : MonoBehaviour public void SetCornProperty(float popTime, float burntDuration, float spillSpeed, float popSpeed) { - cornPopTime = popTime + Random.Range(0, 5f); - cornBurntTime = cornPopTime + burntDuration + Random.Range(0, 1f); + cornPopTime = popTime; + cornBurntTime = cornPopTime + burntDuration; cornSpillSpeed = spillSpeed; cornPopSpeed = popSpeed; } diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs index 9278f7aa..ccf06e07 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs @@ -29,7 +29,9 @@ public class CornManager : MonoBehaviour [SerializeField] private float coldGrowSpeed = .1f; [SerializeField] private float hotGrowSpeed = 2f; [SerializeField] private float baseCornPopTime = 5f; + [SerializeField] private float cornPopRandom = 5f; [SerializeField] private float cornBurntDuration = 5f; + [SerializeField] private float cornBurntRandom = 1f; [SerializeField] private float cornSpillSpeed = 50f; [SerializeField] private float cornPopSpeed = 20f; @@ -137,7 +139,7 @@ public class CornManager : MonoBehaviour { var corn = Instantiate(cornPrefab, cornSpawnTarget); cornArray[i] = corn; - corn.SetCornProperty(baseCornPopTime, cornBurntDuration, cornSpillSpeed, cornPopSpeed); + corn.SetCornProperty(baseCornPopTime + Random.Range(0f, cornPopRandom), cornBurntDuration + Random.Range(0f, cornBurntRandom), cornSpillSpeed, cornPopSpeed); // 進行速度の変更時、コーン速度変更 cornGrowSpeed.TakeWhile(_ => !isCompleted).Subscribe(x =>