diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity b/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity index 30b03778..f2f8d88e 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity @@ -8924,9 +8924,8 @@ MonoBehaviour: coldGrowSpeed: 0.1 hotGrowSpeed: 2 baseCornPopTime: 12.5 - cornPopRandom: 5 cornBurntDuration: 1.5 - cornBurntRandom: 1 + cornBurntRandom: 5 cornSpillSpeed: 70 cornPopSpeed: 20 cornCountSlider: {fileID: 657773260} diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs index 1457e016..6949cfb9 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs @@ -29,7 +29,6 @@ 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; @@ -137,13 +136,28 @@ public class CornManager : MonoBehaviour } } cornArray = new Corn[cornSpawnCount]; - + + // コーン生成 + var popTime = 1f; for (int i = 0; i < cornSpawnCount; i++) { + // コーン生成テーブル + if (1 <= i && i <= 5) + { + popTime += 3 - (i - 1) * .5f; + } + else if (6 <= i && i <= 10) + { + popTime += 0.5f - (i - 6) * .1f; + } + else if (11 <= i) + { + popTime += .1f; + } + var corn = Instantiate(cornPrefab, cornSpawnTarget); cornArray[i] = corn; - corn.SetCornProperty(baseCornPopTime + Random.Range(0f, cornPopRandom), cornBurntDuration + Random.Range(0f, cornBurntRandom), cornSpillSpeed, cornPopSpeed); - + corn.SetCornProperty(popTime, cornBurntDuration + Random.Range(0, cornBurntRandom), cornSpillSpeed, cornPopSpeed); // 進行速度の変更時、コーン速度変更 cornGrowSpeed.TakeWhile(_ => !isCompleted).Subscribe(x => { diff --git a/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornField.cs b/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornField.cs index cba04d39..4e342b65 100644 --- a/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornField.cs +++ b/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornField.cs @@ -55,7 +55,7 @@ public class CornField : MonoBehaviour plants[ii].Harvested.Subscribe(_ => { // 収穫 - + VibrationManager.Instance.PlayVibrationOnce(); var harvest = Instantiate(harvestPrefab, plants[ii].transform); this.CallWaitForSeconds(.5f, () => { @@ -77,6 +77,7 @@ public class CornField : MonoBehaviour promoteGrowthButton.OnClickAsObservable().Subscribe(_ => { + VibrationManager.Instance.PlayVibrationOnce(); for (int i = 0; i < plants.Count; i++) { if (Random.Range(0, 2) == 0){