ミス演出周り整理
This commit is contained in:
parent
a5a635c1c7
commit
faa680d335
|
|
@ -18,11 +18,6 @@ public class CornManager : MonoBehaviour
|
|||
[SerializeField] private Transform cornSpawnTarget;
|
||||
[SerializeField] private Corn cornPrefab;
|
||||
[SerializeField] private GameObject spilledCornAnimationPrefab;
|
||||
[SerializeField] private GameObject missCornAnimationPrefab;
|
||||
[SerializeField] private CornMissMeter cornMissMeter;
|
||||
[SerializeField] private RectTransform missTextSpawnTransform;
|
||||
private static readonly Bounds missEffectBounds = new Bounds(new Vector3(0f, 1.7f), new Vector3(10f, 7f));
|
||||
|
||||
[SerializeField] private int cornSpawnCount = 20;
|
||||
[SerializeField] private int maxFailedCornCount = 10;
|
||||
[SerializeField, ReadOnly] private float baseGrowSpeed = 1f;
|
||||
|
|
@ -124,7 +119,6 @@ public class CornManager : MonoBehaviour
|
|||
{
|
||||
cornGrowSpeed.Value = 0f;
|
||||
missCount.Value = 0;
|
||||
cornMissMeter.ResetMeter();
|
||||
isCompleted = false;
|
||||
compositeDisposable.Clear();
|
||||
cornConditions.Clear();
|
||||
|
|
@ -264,27 +258,6 @@ public class CornManager : MonoBehaviour
|
|||
this.CallWaitForSeconds(1.5f, () => Destroy(animation));
|
||||
}
|
||||
|
||||
private void SpawnMissAnimation(CornCondition condition)
|
||||
{
|
||||
// ミス表示
|
||||
var position = new Vector2(Random.Range(missEffectBounds.min.x, missEffectBounds.max.x), Random.Range(missEffectBounds.min.y, missEffectBounds.max.y));
|
||||
var animation = Instantiate(missCornAnimationPrefab, position, Quaternion.identity, missTextSpawnTransform);
|
||||
animation.GetComponent<CornMissEffect>().ChangeSkin(condition);
|
||||
|
||||
this.CallWaitForSeconds(.75f, () =>
|
||||
{
|
||||
this.CallLerp(.2f, f =>
|
||||
{
|
||||
animation.transform.position = Vector3.Lerp(position, cornMissMeter.transform.position, f.EaseInCubic());
|
||||
}, () =>
|
||||
{
|
||||
VibrationManager.Instance.PlayVibrationOnce();
|
||||
cornMissMeter.SetMeter((float)missCount.Value/maxFailedCornCount);
|
||||
Destroy(animation);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private void SetResult(CornResult resultValue)
|
||||
{
|
||||
cornGrowSpeed.Value = 0f;
|
||||
|
|
|
|||
Loading…
Reference in New Issue