リファクタ
This commit is contained in:
parent
2cfa5e34d1
commit
ff4e5c4f3b
|
|
@ -122,18 +122,17 @@ public class PopcornGameManager : MonoBehaviour
|
|||
cornManager.SetCornsActive(true);
|
||||
compositeDisposable.Clear();
|
||||
cornManager.Result.SkipLatestValueOnSubscribe()
|
||||
.FirstOrDefault()
|
||||
.DelayFrame(1) // Disposeタイミング調整
|
||||
.Take(1)
|
||||
.Subscribe(result =>
|
||||
{
|
||||
state.Value = GameState.Result;
|
||||
// リザルト表示遅延
|
||||
this.CallWaitForSeconds(1.2f, () =>
|
||||
Observable.Timer(TimeSpan.FromSeconds(1.2f)).Subscribe(_ =>
|
||||
{
|
||||
LocalCacheManager.Save(CookingResultDataTag, (rarityData, result, new Action(() => cornManager.SetCornsActive(false))));
|
||||
LocalCacheManager.Save(RestartCallbackTag, new Action(ResetGame));
|
||||
TransitionManager.Instance.LoadSceneAdditive(GameScenes.CookingResults);
|
||||
});
|
||||
}).AddTo(compositeDisposable);
|
||||
}).AddTo(compositeDisposable);
|
||||
|
||||
// 画面タップでスタート
|
||||
|
|
|
|||
Loading…
Reference in New Issue