From 54927fb4cee409a6983dd2def7286aec0b1e8743 Mon Sep 17 00:00:00 2001 From: kimura Date: Wed, 21 Jul 2021 14:47:44 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=B3=E3=81=AE=E5=BC=BE?= =?UTF-8?q?=E3=81=91=E3=82=8B=E6=99=82=E9=96=93=E3=82=92=E3=83=AD=E3=82=B8?= =?UTF-8?q?=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 =>