所持金0時に直接広告視聴ポップアップを出す処理を追加
This commit is contained in:
parent
d5a79cae10
commit
3bf5ec9381
|
|
@ -18,9 +18,12 @@ public class KitchenManager : MonoBehaviour
|
|||
[SerializeField] private KitchenView kitchenView;
|
||||
[SerializeField] private BulkOrderIndicatorView orderIndicatorView;
|
||||
|
||||
private readonly Subject<Unit> showAdDialogSubject = new Subject<Unit>();
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
showAdDialogSubject.AddTo(this);
|
||||
SoundManager.Instance.PlayBGM("bgm_Main");
|
||||
var gameData = GameDataManager.GameData;
|
||||
|
||||
|
|
@ -106,7 +109,9 @@ public class KitchenManager : MonoBehaviour
|
|||
}).AddTo(this);
|
||||
|
||||
kitchenView.Initialize();
|
||||
adButton.OnClickAsObservable().ThrottleFirst(TimeSpan.FromSeconds(.3f)).Subscribe(_ =>
|
||||
adButton.OnClickAsObservable()
|
||||
.Merge(showAdDialogSubject)
|
||||
.ThrottleFirst(TimeSpan.FromSeconds(.3f)).Subscribe(_ =>
|
||||
{
|
||||
// 動画視聴POP
|
||||
GetRewardDialog.ShowCoinDialog(() =>
|
||||
|
|
@ -137,6 +142,7 @@ public class KitchenManager : MonoBehaviour
|
|||
// 所持金0救済
|
||||
adButton.gameObject.SetActive(true);
|
||||
kitchenView.SetTiredAnimation();
|
||||
showAdDialogSubject.OnNext(Unit.Default);
|
||||
}
|
||||
else if (remaining > 0 || gameData.isFirstPlay)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue