畑演出中にレベルアップ演出が入らないようにした
This commit is contained in:
parent
f1d0e27e5e
commit
998e1a1ec1
|
|
@ -57,13 +57,14 @@ public class CornField : MonoBehaviour
|
|||
|
||||
private readonly CompositeDisposable compositeDisposable = new CompositeDisposable();
|
||||
private readonly Subject<int> resetFertilizerTimer = new Subject<int>();
|
||||
private bool isFertilizing;
|
||||
private readonly BoolReactiveProperty isFertilizing = new BoolReactiveProperty();
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
compositeDisposable.AddTo(this);
|
||||
resetFertilizerTimer.AddTo(this);
|
||||
isFertilizing.AddTo(this);
|
||||
|
||||
SoundManager.Instance.PlayBGM("bgm_Main");
|
||||
// データ
|
||||
|
|
@ -88,6 +89,9 @@ public class CornField : MonoBehaviour
|
|||
|
||||
// ハートゲージがフルかつダイアログが開いていない場合レベルアップ
|
||||
HeartMeter.Instance.FulledHeart
|
||||
.CombineLatest(isFertilizing, (acc, active) => acc && !active)
|
||||
.DistinctUntilChanged()
|
||||
.Where(x => x)
|
||||
.DelaySubscription(TimeSpan.FromSeconds(.4f))
|
||||
.Subscribe(_ =>
|
||||
{
|
||||
|
|
@ -151,13 +155,13 @@ public class CornField : MonoBehaviour
|
|||
{
|
||||
GetRewardDialog.ShowCornFieldDialog(() =>
|
||||
{
|
||||
isFertilizing.Value = true;
|
||||
gameData.fertilizerTime = DateTime.UtcNow.AddSeconds(fertilizerWaitTime + fertilizerDuration).ToBinary();
|
||||
#if UNITY_EDITOR
|
||||
gameData.fertilizerTime = DateTime.UtcNow.AddSeconds(10 + fertilizerDuration).ToBinary();
|
||||
#endif
|
||||
GameDataManager.SaveGameData();
|
||||
|
||||
isFertilizing = true;
|
||||
additionView.IsStopDisapper = true;
|
||||
SoundManager.Instance.PlayBGM("bgm_fertilizer");
|
||||
brotherFertilizerAnimation.StartAnimation();
|
||||
|
|
@ -196,7 +200,7 @@ public class CornField : MonoBehaviour
|
|||
|
||||
this.CallWaitForSeconds(fertilizerFinishWaitTime, () =>
|
||||
{
|
||||
isFertilizing = false;
|
||||
isFertilizing.Value = false;
|
||||
additionView.IsStopDisapper = false;
|
||||
additionView.PlayEffect();
|
||||
// ボタン表示復活
|
||||
|
|
|
|||
Loading…
Reference in New Issue