コーン収穫修正
This commit is contained in:
parent
2b2de6f434
commit
3e10964258
|
|
@ -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, () =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue