コーン完成時間の調整箇所を変更
This commit is contained in:
parent
cf3548f13e
commit
ac7f930732
|
|
@ -146,8 +146,8 @@ public class Corn : MonoBehaviour
|
|||
|
||||
public void SetCornProperty(float popTime, float burntDuration, float spillSpeed, float popSpeed)
|
||||
{
|
||||
cornPopTime = popTime + Random.Range(0, 5f);
|
||||
cornBurntTime = cornPopTime + burntDuration + Random.Range(0, 1f);
|
||||
cornPopTime = popTime;
|
||||
cornBurntTime = cornPopTime + burntDuration;
|
||||
cornSpillSpeed = spillSpeed;
|
||||
cornPopSpeed = popSpeed;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@ 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;
|
||||
|
||||
|
|
@ -137,7 +139,7 @@ public class CornManager : MonoBehaviour
|
|||
{
|
||||
var corn = Instantiate(cornPrefab, cornSpawnTarget);
|
||||
cornArray[i] = corn;
|
||||
corn.SetCornProperty(baseCornPopTime, cornBurntDuration, cornSpillSpeed, cornPopSpeed);
|
||||
corn.SetCornProperty(baseCornPopTime + Random.Range(0f, cornPopRandom), cornBurntDuration + Random.Range(0f, cornBurntRandom), cornSpillSpeed, cornPopSpeed);
|
||||
|
||||
// 進行速度の変更時、コーン速度変更
|
||||
cornGrowSpeed.TakeWhile(_ => !isCompleted).Subscribe(x =>
|
||||
|
|
|
|||
Loading…
Reference in New Issue