From 3e10964258779092d666e25fadb55083ff4ac189 Mon Sep 17 00:00:00 2001 From: kimura Date: Wed, 4 Aug 2021 13:14:28 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=B3=E5=8F=8E=E7=A9=AB?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/MyGame/Scenes/CornField/Scripts/CornField.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornField.cs b/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornField.cs index ef502a0d..d1319d9a 100644 --- a/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornField.cs +++ b/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornField.cs @@ -27,7 +27,7 @@ public class CornField : MonoBehaviour private static readonly int maxPeriod = 60; private static readonly int minPeriod = 45; private static readonly int harvestedFrameInterval = 3; - private static readonly float harvestedDistance = .2f; + private static readonly float harvestedDistance = .6f; private readonly CompositeDisposable compositeDisposable = new CompositeDisposable(); // Start is called before the first frame update @@ -110,7 +110,11 @@ public class CornField : MonoBehaviour var seedlingTransform = seedling.transform; for (int j = 0; j < harvestCount; j++) { - var pos = seedlingTransform.position + Vector3.right * (j - 1) * (harvestCount - 1) * harvestedDistance + Vector3.forward * (j - 1); + var pos = seedlingTransform.position; + if (harvestCount > 1) + { + pos += Vector3.right * (j - 1) * harvestedDistance + Vector3.forward * (j - 1); + } // 複数株 this.CallWaitForFrame(harvestedFrameInterval * j, () => {