Merge branch 'develop' of bitbucket.org:usaya/popcorn into develop
This commit is contained in:
commit
21c81e95b1
|
|
@ -8924,9 +8924,8 @@ MonoBehaviour:
|
|||
coldGrowSpeed: 0.1
|
||||
hotGrowSpeed: 2
|
||||
baseCornPopTime: 12.5
|
||||
cornPopRandom: 5
|
||||
cornBurntDuration: 1.5
|
||||
cornBurntRandom: 1
|
||||
cornBurntRandom: 5
|
||||
cornSpillSpeed: 70
|
||||
cornPopSpeed: 20
|
||||
cornCountSlider: {fileID: 657773260}
|
||||
|
|
|
|||
|
|
@ -29,7 +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;
|
||||
|
|
@ -137,13 +136,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, cornBurntDuration + Random.Range(0, cornBurntRandom), cornSpillSpeed, cornPopSpeed);
|
||||
// 進行速度の変更時、コーン速度変更
|
||||
cornGrowSpeed.TakeWhile(_ => !isCompleted).Subscribe(x =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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){
|
||||
|
|
|
|||
Loading…
Reference in New Issue