From f0bf098efee145c660576f1fa32aaf61ac5124a3 Mon Sep 17 00:00:00 2001 From: kimura Date: Wed, 21 Jul 2021 14:47:25 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E5=A4=89=E6=95=B0?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity | 3 --- .../Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs | 7 ------- 2 files changed, 10 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity b/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity index 30b03778..fbd14618 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity @@ -8924,9 +8924,6 @@ MonoBehaviour: coldGrowSpeed: 0.1 hotGrowSpeed: 2 baseCornPopTime: 12.5 - cornPopRandom: 5 - cornBurntDuration: 1.5 - cornBurntRandom: 1 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..df6d32eb 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs @@ -29,9 +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; [SerializeField] private float cornPopSpeed = 20f; @@ -104,8 +101,6 @@ public class CornManager : MonoBehaviour coldGrowSpeedSlider.value = coldGrowSpeed; hotGrowSpeedSlider.value = hotGrowSpeed; popTimeSlider.value = baseCornPopTime; - burntDurationSlider.value = cornBurntDuration; - burntRandomSlider.value = cornBurntRandom; spilledSpeedSlider.value = cornSpillSpeed; popSpeedSlider.value = cornPopSpeed; @@ -114,8 +109,6 @@ public class CornManager : MonoBehaviour coldGrowSpeedSlider.OnValueChangedAsObservable().Subscribe(x => coldGrowSpeed = x).AddTo(this); hotGrowSpeedSlider.OnValueChangedAsObservable().Subscribe(x => hotGrowSpeed = x).AddTo(this); popTimeSlider.OnValueChangedAsObservable().Subscribe(x => baseCornPopTime = x).AddTo(this); - burntDurationSlider.OnValueChangedAsObservable().Subscribe(x => cornBurntDuration = x).AddTo(this); - burntRandomSlider.OnValueChangedAsObservable().Subscribe(x => cornBurntRandom = x).AddTo(this); spilledSpeedSlider.OnValueChangedAsObservable().Subscribe(x => cornSpillSpeed = x).AddTo(this); popSpeedSlider.OnValueChangedAsObservable().Subscribe(x => cornPopSpeed = x).AddTo(this); #endif From 54927fb4cee409a6983dd2def7286aec0b1e8743 Mon Sep 17 00:00:00 2001 From: kimura Date: Wed, 21 Jul 2021 14:47:44 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=B3=E3=81=AE?= =?UTF-8?q?=E5=BC=BE=E3=81=91=E3=82=8B=E6=99=82=E9=96=93=E3=82=92=E3=83=AD?= =?UTF-8?q?=E3=82=B8=E3=83=83=E3=82=AF=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scenes/Cooking/Scripts/CornManager.cs | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs index df6d32eb..95194185 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs @@ -130,12 +130,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, baseCornPopTime - popTime, cornSpillSpeed, cornPopSpeed); // 進行速度の変更時、コーン速度変更 cornGrowSpeed.TakeWhile(_ => !isCompleted).Subscribe(x => From d8d7149d983e6cf40b452fdfce373eb73c494c02 Mon Sep 17 00:00:00 2001 From: kimura Date: Wed, 21 Jul 2021 14:59:14 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=E7=9F=AD=E7=B8=AE/=E5=8F=8E=E7=A9=AB?= =?UTF-8?q?=E6=99=82=E3=81=AB=E3=83=90=E3=82=A4=E3=83=96=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornField.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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){ From 059c6c17e2f518da004dcc2f03bc1a89e13c9106 Mon Sep 17 00:00:00 2001 From: kimura Date: Wed, 21 Jul 2021 15:41:35 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=B3=E6=8C=99?= =?UTF-8?q?=E5=8B=95=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity | 2 ++ .../Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity b/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity index fbd14618..f2f8d88e 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity @@ -8924,6 +8924,8 @@ MonoBehaviour: coldGrowSpeed: 0.1 hotGrowSpeed: 2 baseCornPopTime: 12.5 + cornBurntDuration: 1.5 + 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 95194185..6949cfb9 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs @@ -29,6 +29,8 @@ public class CornManager : MonoBehaviour [SerializeField] private float coldGrowSpeed = .1f; [SerializeField] private float hotGrowSpeed = 2f; [SerializeField] private float baseCornPopTime = 5f; + [SerializeField] private float cornBurntDuration = 5f; + [SerializeField] private float cornBurntRandom = 1f; [SerializeField] private float cornSpillSpeed = 50f; [SerializeField] private float cornPopSpeed = 20f; @@ -101,6 +103,8 @@ public class CornManager : MonoBehaviour coldGrowSpeedSlider.value = coldGrowSpeed; hotGrowSpeedSlider.value = hotGrowSpeed; popTimeSlider.value = baseCornPopTime; + burntDurationSlider.value = cornBurntDuration; + burntRandomSlider.value = cornBurntRandom; spilledSpeedSlider.value = cornSpillSpeed; popSpeedSlider.value = cornPopSpeed; @@ -109,6 +113,8 @@ public class CornManager : MonoBehaviour coldGrowSpeedSlider.OnValueChangedAsObservable().Subscribe(x => coldGrowSpeed = x).AddTo(this); hotGrowSpeedSlider.OnValueChangedAsObservable().Subscribe(x => hotGrowSpeed = x).AddTo(this); popTimeSlider.OnValueChangedAsObservable().Subscribe(x => baseCornPopTime = x).AddTo(this); + burntDurationSlider.OnValueChangedAsObservable().Subscribe(x => cornBurntDuration = x).AddTo(this); + burntRandomSlider.OnValueChangedAsObservable().Subscribe(x => cornBurntRandom = x).AddTo(this); spilledSpeedSlider.OnValueChangedAsObservable().Subscribe(x => cornSpillSpeed = x).AddTo(this); popSpeedSlider.OnValueChangedAsObservable().Subscribe(x => cornPopSpeed = x).AddTo(this); #endif @@ -151,8 +157,7 @@ public class CornManager : MonoBehaviour var corn = Instantiate(cornPrefab, cornSpawnTarget); cornArray[i] = corn; - corn.SetCornProperty(popTime, baseCornPopTime - popTime, cornSpillSpeed, cornPopSpeed); - + corn.SetCornProperty(popTime, cornBurntDuration + Random.Range(0, cornBurntRandom), cornSpillSpeed, cornPopSpeed); // 進行速度の変更時、コーン速度変更 cornGrowSpeed.TakeWhile(_ => !isCompleted).Subscribe(x => {